This command will update the references/branches locally on your machine and notify about deleted branches from origin
git fetch -p
Before creating a branch, update your project, after that, go to master branch and then run the command:
git checkout -b [your_new_branch]
git status
git diff # you can specify a file path here to see just that file diff
First, you need to stage the files that you want
git add [path_of_the_file] # of --all to add all files modified
Them you write the name/message of this new commit
git commit -m "first commit"
git pull origin [name_of_your_branch]
git checkout [the_other_branch]
git checkout -
git branch -m [old_name] [new_name]
We call this STASH. You can "save" your current modifications for another time. For example, let's say you're modifying inde.html, but need to change branches and do some other fixes on another files. In this case you can "save" your modifications without needing to commit them
git stash
-> will save the modifications
git stash apply
-> will apply the modifications
git stash clear
-> clean the modifications
git reset --soft [commit sha1]
If you want to delete all things modified and don't wanna keep them, just change --soft
for --hard
This command will get the informations from [the_branch_with_updates] and insert
git rebase [the_branch_with_updates]
git merge [the_branch_with_updates]
Search for an specific file on Git History (see this)
git log --all --full-history -- **/the_file.html
If you want to show just the modifications for this file in a specific commit
git show <SHA of the commit> -- **/the_file.html
"10" here will grab the current commit and the next 10 previous commits
git rebase -i HEAD~10
With this command you can change messages, "merge" commits into each other delete, squash and some other commands (by default will open in VI terminal)