Post

23 Study guide Git branches and merging

CommandExplanation & link
git branchcan be used to list, create, or delete branches.
git branch can be used to create a new branch in your repository.
git branch -d can be used to delete a branch from your repository.
git branch -D forces a branch to be deleted.
git checkout switches your current working branch.
git checkout -b creates a new branch and makes it your current working branch.
git merge joins changes from one branch into another branch.
git merge –abortcan only be used after merge conflicts. This command will abort the merge and try to go back to the pre-merge state.
git log –graphprints an ASCII graph of the commit and merge history.
git log –onelineprints each commit on a single line.
This post is licensed under CC BY 4.0 by the author.