Sourcetree无法将某些引用推送到仓库。

3
我使用Sourcetree作为我的版本控制系统,有一个主分支和一个开发分支,特征、热修复和发布分支。不慎地,我在主分支上提交并推送到了origin,而我应该提交到我的特征分支feature/new-design。现在在进行git flow的发布过程中,我遇到了下面的两个错误,因此bitbucket没有触发连接的dploy.io的部署。问题是:我如何在没有错误的情况下恢复我心爱的git flow流程? :)
详细信息: 这里没有提交,我做了以下步骤,只是为了向你展示正在发生什么 :) 1)完成新设计特性的git flow(同时保留),没有出现错误。
Summary of actions:
- The feature branch 'feature/new-design' was merged into 'develop'
- Feature branch 'feature/new-design' is still available
- You are now on branch 'develop'
Completed successfully.

2) 开发时,启动新版本没有错误

操作摘要: - 基于'develop'创建了一个新分支'release/1.7j' - 现在你在'release/1.7j'分支上

Follow-up actions:
- Bump the version number now!
- Start committing last-minute fixes in preparing your release
- When done, run:
 git flow release finish '1.7j'
Completed successfully.

3) 处于版本1.7j并完成后,会出现错误。 使用的参数:带有消息的标签,删除分支并将更改推送到远程。

Switched to branch 'master'
Deleted branch release/1.7j (was d1277f5).
Everything up-to-date
Everything up-to-date
To 'this is the correct address of the repo'
 * [new tag]         1.7j -> 1.7j
error: unable to delete 'release/1.7j': remote ref does not exist
error: failed to push some refs to 'this is the correct address of the repo'

Could not delete the remote release/1.7j in origin.
Completed with errors, see above.

4) 点击 Close 后,主分支的样子如下图所示:

branch master

如果您需要更多信息,请告诉我。感谢您的帮助 :)

1个回答

2
解决方案: 我在Bitbucket上看到,develop分支、feature/new-design分支和release-1.7分支都不在,只有主分支master。直接在完成发布之前,我将所有分支(master、develop、new-design和release)推送到origin,这样Bitbucket就会添加这些分支。在完成发布之后,一切都很顺利,dploy自动进行了增量部署。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接