| git status |
Status of Local |
| git count -objects |
Shows amount of objects being tracked |
| git pull origin master |
Stage local repo to match Github repo |
| git add filename |
Stage one particular file |
| git add -A |
Stages all files |
| git branch -a |
Shows all local & remote branches |
| git commit -m "comment" |
Commit staged files |
| git commit -am "comment" |
Stage and Commit all files |
| git push origin branchname |
Push particular branch to Github repo |
| git remote add origin URL |
Step 1 - Push local repo to Github repo |
| git push -u origin master |
Step 2 - Push local repo to Github repo |
| git checkout -b branchname |
Create and switch to new branch |
| git checkout branchname |
Switch to branch |
| git checkout master |
Return to master branch |
| git checkout -t origin/branch-name |
Brings down a particular branch |
| git branch -d branchname |
Delete a branch |
| git log |
Commit History |
| git branch |
Lists all branches |
| git ls-files |
List files managed by Git |