17/10
TOP - Foundation: 89%
Revisiting Rock Paper Scissors
Today I learned about git branch, git checkout and git merge.
Very useful, probably will use these commands often.
git branch - git branch branch_name : create a new branch ( point to the current commit ), doesn't move you to that branch. Once you switch to that branch, you can commit on it and don't have to worry about affecting main branch.
git checkout - git checkout branch_name: switch to that branch, the files in your working folder change to match it. If your want to go back to main branch then use git checkout main.
git merge - git merge branch_name: bring into the current branch all the commits from branch_name that the current branch doesn't have.
Top comments (0)