Working with Git branches Flashcards
What’s the procedure of merging solution branch to main branch?
git checkout main
git merge solution
What’s “fast forward” merge?
A merge that happens when target branch doesn’t contain any new commits at the point in time when you want to merge from solution.
How to compare 2 branches?
git diff branch1 branch2
How to see current changes that haven’t been staged yet?
git diff
How to see just current changes that have been staged?
git diff –cached
How to see staged and unstaged current changes?
git diff HEAD
How to commit all changes using one line command?
git commit -am “message”
How to ignore whitespace changes when doing diff?
git diff -w
How to show the original content of a file when doing diff?
git show <hash></hash>