Last active
February 18, 2018 12:10
-
-
Save davidjguru/065834d83d332f3e23b0a7dacb3610fa to your computer and use it in GitHub Desktop.
Git & Branches
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Create new branch and switch to it at the same time. | |
git checkout -b newbranch | |
## This is shorthand for: | |
## git branch newbranch | |
## git checkout newbranch | |
## Basic Merging | |
git checkout master | |
## Switched to branch 'master' | |
git merge newbranch | |
## Merge newbranch from master | |
## Delete newbranch | |
git branch -d newbranch | |
## Show branches local and remotes | |
git branch -a | |
## Show remotes | |
git branch -r |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment