git commit -m 与 git commit -am 的区别
2017-12-13 09:35
183 查看
一、通常我们修改一个文件并且将文件提交到本地的分支并且推送到远程服务器的操作如下:
git add .
git commit -m "some str"
git push
二、我们也可以将上面的三大步简化一下:
git commit -am "some str"
git push
三、针对第一步中的git add .命令的作用就是将本地修改过的文件且已经追踪的文件添加到本地的暂存区,然后使用git commit -m "str"命令将暂存区的代码提交到本地仓库,最后将本地仓库的代码推送到远程服务器端;
第二部其实就相当于第一步的结合,但是有区别的是git commit -am 'str'命令只能提交已经追踪过且修改了的文件,去过是新增文件就必须使用第一步的命令;
git add .
git commit -m "some str"
git push
二、我们也可以将上面的三大步简化一下:
git commit -am "some str"
git push
三、针对第一步中的git add .命令的作用就是将本地修改过的文件且已经追踪的文件添加到本地的暂存区,然后使用git commit -m "str"命令将暂存区的代码提交到本地仓库,最后将本地仓库的代码推送到远程服务器端;
第二部其实就相当于第一步的结合,但是有区别的是git commit -am 'str'命令只能提交已经追踪过且修改了的文件,去过是新增文件就必须使用第一步的命令;
相关文章推荐
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m 与 git commit -am 的区别
- git commit -m与-am的区别
- git commit -m 与 git commit -am 的区别