Git - Branches Flashcards
1
Q
List all of the branches in your repo. Add a argument to create a new branch with the name
A
git branch
2
Q
Create and checkout a new branch named . Drop the -b flag to checkout an existing branch.
A
git checkout -b
3
Q
Merge into the current branch
A
git merge
4
Q
How to delete a branch
A
git branch -d
When you delete you can still access the branch from master using a commit id. E.g. if you want to undo changes added from use the commit id you just received to go back to the branch.