git协同开发

当你从远程仓库克隆时,实际上Git自动把本地的master分支和远程的master分支对应起来了,并且,远程仓库的默认名称是origin

要查看远程库的信息,用git remote

[root@web02 oldboypython]# git remote
origin

git remote -v显示更详细的信息: [root@web02 oldboypython]# git remote
-v origin git@192.168.119.12:root/oldboypython.git (fetch) origin git@192.168.119.12:root/oldboypython.git (push)

推送分支

推送分支,就是把该分支上的所有本地提交推送到远程库。推送时,要指定本地分支,这样,Git就会把该分支推送到远程库对应的远程分支上:

git push origin master

猜你喜欢

转载自www.cnblogs.com/pyyu/p/10165476.html
今日推荐