Useful Git Command Note (Uncompleted)
I’m taking this note to avoid googling them each time I wanted to use them.
graph enables you to view different branches
oneline will format git log into one line output
decorate adds some highlights to branch names
all helps you view all branches.
I’d suggest you to rebase when git pull, this will prevent “Merge conflict” from happening. Honestly, I don’t like to handle conflicts manually.
If you want to know the difference between
git pull and
git pull --rebase, check this: Difference between git pull and git pull –rebase. The difference between
git merge and
git rebase can also be found here: What’s the difference between ‘git merge’ and ‘git rebase’?.
Needless to say, it you want to squash serveral commits into one commit, this helps a lot. More detailed instructions can be found here: squashing commits with rebase.