Use fish shell + tide, especially for best command history suggestions (https://gist.github.com/ostanislaw/452484846749bfbb7706f2b2b1b71e49#fish-shell)
git fetch
git branch
git branch -avv
git switch task/master/ADDO-1234-existing-branch
git checkout origin/integ/mater
git switch -C task/master/ADDO-1234-existing-branch
git add --update --patch
(use y/n/s/? - I don't know other options actually)
(and you could break with ctrl+c if you did mistake in your y/n)
(git add is technically performed once for all files after last accepted hunk)
git checkout -
git reflog
git checkout HEAD~2
git checkout HEAD@{2}
git reset [reference]
git reset [--hard] [reference]
git clean -fd
git status -> git merge --abort
General hint:
avoid relying on local "copies" of remote master branches like git checkout integ/master, git pull, git checkout -b new_branch
And why:
- you could forget to do git pull
- you could accidentaly commited a change on "integ/master", then git pull and you have conflicts in best case, but worse if it would merge and you would continue with unwanted commit on what you believe is remote integ/master state.
- accidental git push from "integ/master"
instead try
git fetch, git checkout origin/integ/master
. The only thing you could forget is git fetch, but it's rather easy to be solved.