Git--常用操作

git add   #   git add .      “.” 表示当前目录所有

git status

git diff

git commit

get reset HEAD^    #HEAD^的意思是上一个版本,执行一次,回退一次,知道回退所有的commit

git pull

git push

 

git fetch 拉取最新分支列表

git checkout <分支名称>

 

用文件 .gitignore 作提交忽略

全局设置;

git config --global core.excludesfile  .gitignore

 

posted @ 2020-04-15 18:01  夜未眠shm  阅读(100)  评论(0编辑  收藏  举报