| Command |
Syntax |
Function |
| git clone [URL] |
[URL] : A GitHub repo link |
Clones [URL] to the current directory |
| git pull |
none |
Pulls the latest updates from the main branch |
| git pull origin [NAME] |
[NAME] : Name of a branch in the repo |
Pulls the latest updates from the named branch |
| git branch [NAME] |
[NAME] : Name of a branch |
Makes a new branch with a name. Branch will go to GitHub on push |
| git checkout [NAME] |
[NAME] : Name of a branch |
Changes working branch to the named branch |
| git branch |
none |
Lists the local branches |
| git push origin --delete [NAME] |
[NAME] : The name of a branch |
Deletes the named branch |
| git add . |
none |
Tells Git which files you have changed |
| git status |
none |
Tells you which files you told Git you have changed |
| git commit -m [MESSAGE] |
[MESSAGE] : A short message to others saying what you changed |
Commits latest changes to Git |
| git push |
none |
Pushes latest commit to GitHub |