今天我尝试同步主和开发分支。代码位于GitHub的私有存储库中。我正在使用此处描述的git工作流程:http://nvie.com/posts/a-successful-git-branching-model/
在同步之前,我已将修补程序分支合并到主:
$ git status
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
$ git pull origin master
From https://github.com/xxx/xxx
* branch master -> FETCH_HEAD
Already up-to-date.
$ git checkout develop
Switched to branch 'develop'
Your branch is up-to-date with 'origin/develop'.
$ git status
On branch develop
Your branch is up-to-date with 'origin/develop'.
nothing to commit, working directory clean
$ git merge --no-ff master
Merge made by the 'recursive' strategy.
test.file | 2 ++
1 file changed, 2 insertions(+)
$ git status
On branch develop
Your branch is ahead of 'origin/develop' by 3 commits.
(use "git push" to publish your local commits)
nothing to commit, working directory clean
当我试图将我的本地开发分支推送到远程时,我收到了这个错误:
$ git push origin develop
Counting objects: 1, done.
Writing objects: 100% (1/1), 232 bytes | 0 bytes/s, done.
Total 1 (delta 0), reused 0 (delta 0)
error: RPC failed; result=7, HTTP code = 0
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date
然后我再次尝试并得到了这个错误:
$ git push origin develop
fatal: unable to access 'https://github.com/xxx/xxx.git/': Failed connect to github.com:443; Operation timed out
查看GitHub网页界面,我看到: 在本地终端上使用Git CLI进行验证:
$ git checkout master
$ git log --oneline master..develop
12rt21t Merge branch 'master' into develop
12rth1t Merge branch 'master' into develop
我的问题是:
1)我应该担心吗?
2)我该如何解决这个问题?
3)这个分支提前2次提交,0次提交主人意味着什么?
谢谢!