GIT 常用命令

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了GIT 常用命令相关的知识,希望对你有一定的参考价值。

上传一个新的文件:

git add Test.txt

git commit -m ‘备注‘

git push origin master //推送内容上传

提交修改内容:

git status -s  //获取当前状态

git add Test.txt //缓存需要修改的文件

git commit -m ‘update‘ // 上传说明

git push origin master //推送修改内容

文件移动:

git mv test.txt wenjianjia

git status -s //查看状态 (可无)

git commit -m ‘move‘

git push origin master//推送修改内容

文件删除:

git rm test.txt

git commit -a -m ‘del‘

git push origin master

 

上传文件夹时,该文件夹下必须有文件。

 

以上是关于GIT 常用命令的主要内容,如果未能解决你的问题,请参考以下文章