git - Sourcetree 无法将某些引用推送到存储库

标签 git branch atlassian-sourcetree

我使用 Sourcetree 作为我的版本控制系统,有一个 master 和一个 develop 分支,feature,hotfix 和 release 分支。 不小心我在分支主管上,致力于它并被推到原点,在那里我应该致力于我的功能分支功能/新设计。 现在执行 git 流发布过程时,我遇到了下面描述的两个错误,因此 bitbucket 不会触发连接的 dploy.io 上的部署。 问题是:我怎样才能在没有错误的情况下恢复我心爱的 git 流程? :)

详细信息: 在没有提交的地方,我在完成发布后立即执行了以下步骤 - 只是为了向您展示发生了什么:)

1) Git 流程完成功能新设计(同时保持它)工作无错误

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) 点击关闭主分支后如下图所示:

branch master

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

最佳答案

解决方法: 我看到在 bitbucket 中没有分支 develop、feature/new-design 和 release-1.7,只有分支 master。 在完成发布之前,我直接推到原点并选择每个分支(master、develop、new-design 和 release),以便 bitbucket 添加分支。完成发布后,一切都很顺利,dploy 会自动进行增量部署。

关于git - Sourcetree 无法将某些引用推送到存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29549942/

相关文章:

git - 显示提交的原始分支

git - 如何在现有仓库中创建子模块

git - 如何将我的本地 Git 存储库移动到远程 Git 存储库

git - 我如何判断给定的 git 标签是带注释的还是轻量级的?

git - 提交远程 fork 的 pull 请求

git - SourceTree-git : fatal: remote error: Repository not found

macos - OSX 上的 SourceTree : Clicking "Always Allow" bitbucket to use my password keychain has no effect

c++ - 无法将任何文件添加到 GIT "libgit2 returned: Invalid data in index - invalid entry"

Git 从分支 checkout 文件而不跟踪它们

tfs - 寻找支持集成测试分支的TFS分支方案