git add -u
This is most useful when your terminal is not in the root and you don't want to change dir just to commit
git add :/ -u
git checkout master
git checkout -b hotfix
git push origin hotfix
YOU FIX YOUR PROBLEM HERE
git add -A
git commit -m "Fixed typo."
git push
git checkout develop
git merge hotfix
git checkout master
git push origin :hotfix
git branch -D hotfix
Tipically database config files, .htaccess, etc.
git update-index --assume-unchanged <file>
git update-index --no-assume-unchanged <file>
git stash
git checkout other-branch
git stash pop
git checkout -b user/feature
git add .
git push --set-upstream origin user/feature
git reset --hard ORIG_HEAD
git clone ... --depth=1
git reset --soft HEAD~1
Just to check something
git checkout <hash-of-commit>
git checkout user/feature
git pull --all
git rebase develop
And if you need to fix merge conflicts: do the fixes, then don't commit, just git add
the files, then git rebase --continue
. If you already commited the merge then you can backup with git reset HEAD~
and then git add
and then git rebase --continue
.
git push origin :zsitro/responsive
git branch -d zsitro/responsive