Some Git Commands

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
	
git config --global color.ui true # support color global.

git reset --hard 89428ab23e4bd3028c95b4b4064075b3901654a3 # reset HEAD, index and working tree

git branch -a # List both remote-tracking branches and local branches.

git branch backups # new branch backups.

git push origin backups:backups # push local branch to remote branch.

git push origin :backups # delete remote branch backups.

git branch -d backups # delete local branch backups.

1
2
3
4
5
6
7

git commit -m 'commit data' #forgin a file.

git add another_file # add the file.

git commit --amend # commit again.