-
Notifications
You must be signed in to change notification settings - Fork 12
Git Cheat Sheet
The below git commands have taken from an online cheat sheet. The commands can be entered into GitBash/Command prompt.
$ git clone [URL]
Retrieve an entire repository from GitHub via URL
$ git branch
List your branches. a * will appear next to the currently active branch.
$ git checkout
Switch to another branch and check it out into your working directory.
$ git pull
Fetch and merge any commits from the tracking remote branch.
$ git add .
$ git add --patch
Add a file as it looks now to your next commit (stage).
$ Git commit -m “[descriptive message]"
Commit your staged content as a new commit snapshot.
$ git push [alias][branch]
Transmit local branch commits to remote repository branch.
This is not an exhaustive document of the most common GitBash commands. If there are any you use frequently that have been missed additions are welcomed.
📧 Email us at [email protected] 🐦Find NHS Digital on Twitter 📘Check out the documentation for Codon