Most commonly used commands:
1
2
3
4
5
6
7
8
9
10
11
12
| git remote add origin git@github.com:someaccount/something.git
git pull origin master
git pull origin an_other_branch
git push origin master
git remote show origin
git remote -v
git branch an_other_branch
git branch -d an_other_branch
git commit -m "some description about the commit"
git checkout an_other_branch
git checkout master
git merge an_other_branch
|
Remove file from index ONLY
git rm --cached
See what changes will be made in the next commit
git diff -cached
View changes at each commit
git log -p
Get an overvie of the changes in each
git log --stat --summary
List both remote-tracking branches and local branches.
git branch -a
git log -p HEAD FETCH_HEAD
Clean up git repostitory
git gc --aggressive
Remove file from tracking without deleting
git rm -r --cached to_be_ignored
tar zxvf run.tgz --strip-components 3 --show-transformed