首页 > 其他 > 详细

git add和git commit

时间:2017-08-24 12:01:48      阅读:258      评论:0      收藏:0      [点我收藏+]

git命令使用:提交前可指定要提交哪些文件,然后使用git commit来提交

样例:

git status

输出:

Changes to be committed:

modified:   app/Library/Common.php

 

Changes not staged for commit:

modified:   .env

modified:   index.php

 

Untracked files:

.idea/

 

如果你想加入本次要提交的文件,使用命令:git add index.php

然后index.php会出现在Change to be commited一栏下面

 

最后使用git commit -m ‘commit message‘来提交。

这里一定要注意,千万不能使用:git commit . -m ‘commit message‘。"git commit ."会把当前的所有修改提交到本地版本库

 

git add和git commit

原文:http://www.cnblogs.com/helww/p/7422230.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!