git参考资料

个人博客 http://www.iwangzheng.com/


$git log --graph

$git reset --hard 67889898...

$ssh-add

$git pull --rebase

$git fetch (相当于pull新分支)

$git branch (查看当前所在分支)

$git checkout fetch-xml (转到fetch-xml分支)

参考:
  1. Pro Git http://git-scm.com/book
  2. Git Magic http://www-cs-students.stanford.edu/~blynn/gitmagic/intl/zh_cn/
  3. Git flow(A successful Git branch model) http://nvie.com/posts/a-successful-git-branching-model/
  4. Github flow http://scottchacon.com/2011/08/31/github-flow.html
  5. 构造干净的 Git 历史线索
  6. Git Cheatsheet
 
  1. git remote
    git remote -v
    git remove show origin 查看 origin 中所有远程分支的情况
  2. git branch
    git branch 显示所有本地分支
    git branch -a 显示所有分支
    git branch -m old_name new_name
    git branch --set-upstream <localbranch> <remotebranch>
  3. git log
    git log --pretty=oneline
    git log -n 1 显示最近的一次提交日志
    git log -n 1 --stat 显示最近一次提交更改的所有文件
    git log -n 1 --stat -p 显示最近一次提交更改的所有文件和具体的内容变更
    git log 0f9259d85875c2f078492224618abc84dbabad32 -n 1 --stat -p 显示 0f9259 提交的具体修改内容
原文地址:https://www.cnblogs.com/iwangzheng/p/3772466.html