Git中commit和push的区别

git作为支持分布式版本管理的工具,它管理的库(repository)分为本地库、远程库。
git commit操作的是本地库,git push操作的是远程库。

1.git commit,将本地修改过的文件提交到本地库中
git commit -m '注释信息'

2.git push,将本地库中的最新信息发送给远程库
git push <远程主机名> <本地分支名:远程分支名>
git push origin develop:develop

猜你喜欢

转载自www.cnblogs.com/WebLinuxStudy/p/12295126.html