23 Study guide Git branches and merging
| Command | Explanation & link |
|---|---|
| git branch | can 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 –abort | can only be used after merge conflicts. This command will abort the merge and try to go back to the pre-merge state. |
| git log –graph | prints an ASCII graph of the commit and merge history. |
| git log –oneline | prints each commit on a single line. |
This post is licensed under CC BY 4.0 by the author.