Git Common Commands
Here is a listing of common commands and their operations.
Command | Description | Why | Similar To |
---|---|---|---|
Branching | git-checkout | ||
git checkout -B {name} | Creates Branch and Moves to It. | Combines two commands | git branch new-feature git checkout new-feature |
git switch -c {name} | Create new branch and check it out. | Can be done if work exists on the current branch | |
git branch -v | Retrieve Current Status of Branches | ||
git checkout {branch name} | Checkout the named branch |