"Reprint" color git lg

https://my.oschina.net/u/855913/blog/1846056

 

Will replace git log git lg, and color display for easy viewing and roll back to a version, the effect is as follows:

 

git lg renderings

As long as the command line, enter the following command Enter:

git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"


Then git lg can see the color of the log.

Attach Common git command:

1 . Local repository CD
 2 . Check Status: Git Status
 . 3 add files: Git the Add..
 4. Submit the commit Git - m "Remarks"
 5 view the log:. Git log
 . 6 . Check the current branch: Branch Git
 . 7 . Pull latest code: git pull origin branch name
 8 . push Code: git push origin branch name
 9 delete remote branch: git push origin: branch name. 
 10. the new branch, and switch to the newly created branch: git Checkout - b new branch name
 11 the new branch is pushed to the server: git push origin new branch name
 12. delete the local branch: git branch - D branch name
 13 . merge a branch to the current branch: git merge branch need to be merged into the current name of the branch
 14 . forcibly retreated to release a commit: git reset -hard version number of the first six bits (eg: abe75e)
 15. a added tag: git tag -a "tag name" - m "Notes"
 16Add the tag pushed to the remote server: git the Push the -tag
 17 . Into a brother tag: git checkout label name
 18 forcibly retreated to a label:. Git reset -hard tag name
 19. Delete the local tag: git tag - d tag name
 20. delete the remote tag: git the Push Origin - -delete tag tag name
 21. delete git without deleting the file:. the Find -name ".git | xargs RM - Rf
 22. the view remote git repository address: git remote - v
 23 to remove the git remote address:. git remote RM Origin
 24. the local modifications to the server forcibly push the push -f git - U Origin Master
 25. the modification of a record already submitted notes the commit git - git commit amend, after editing first and then esc: wq to save and exit
 26 all .DS_Store delete the project. 
the Find. -name .DS_Store -print0 | xargs -0 git RM -f --ignore- UNMATCH .gitignore 
echo .DS_Store >> ~ / .gitignore

 

Guess you like

Origin www.cnblogs.com/fubinhnust/p/12014851.html