git 使用技巧

来源:互联网 发布:光大炒股软件下载 编辑:程序博客网 时间:2024/06/05 15:54

/××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××/
 git checkout  XXXXXXXXXXXXXXXXXXXXXXXXXXXXX  返回某一次提交,相当于创建了一个零时的分支
 git checkout  master  返回最新的提交了  ,

/××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××××/ 

git commit 后撤销
     
git reset --hard commit_id(要返回的commit_id)
    git chectout .
    git pull

/******************************************************************************/

修改commit 编辑器
        git config --global core.editor "gedit -w"   改为
gedit修改提交
修改commit 注释
        git commit --amend

 

查看分支:

git branch

查看远程服务端分支:

git branch -r

克隆分支:

 git checkout -b mt6737_m origin/mt6737_m

 



/********************************************************
git add XXX 
git reset XXX
  

/**********************************************************/
git show XXXXXXXX --stat  查看某一commit 修改的文件

0 0