git 如何使用不在 master 分支中的 Sourcetree 进行自动拉取请求?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/25640218/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to make automatic pull request with Sourcetree NOT in master branch?
提问by Stepan Suvorov
I just wondering is there an option in SourceTreeto change the default branch of automatic pull requests.
我只是想知道SourceTree 中是否有一个选项可以更改自动拉取请求的默认分支。
采纳答案by mayo
If you are using SourceTree & github the answer seems to be no :(Yes ! see the last part of my answer !
如果您使用的是 SourceTree 和 github,答案似乎是否定的 :(是的!请参阅我的答案的最后一部分!
The documentation of attlasian says that you can do that in BitBucket if the admin has allowed that option (https://confluence.atlassian.com/display/BITBUCKET/Work+with+pull+requests)
attlasian 的文档说,如果管理员允许该选项,您可以在 BitBucket 中执行此操作(https://confluence.atlassian.com/display/BITBUCKET/Work+with+pull+requests)
If you are pulling a request across branches, you can have the option to close the branch when your request is merged. Whether you have this option depends on whether the repository is Git or Mercurial. Mercurial repositories always have this option. Git repositories have this option if the repo administrator allows it; Otherwise, the option is greyed out.
如果您跨分支拉取请求,您可以选择在合并请求时关闭分支。是否有此选项取决于存储库是 Git 还是 Mercurial。Mercurial 存储库总是有这个选项。如果仓库管理员允许,Git 仓库有这个选项;否则,该选项会变灰。
In other hand if you are working with github you can do that manually.
另一方面,如果您正在使用 github,您可以手动完成。
Merge pull request to a different branch than default, in Github
---Edit:
- -编辑:
Looking deep i found that when you create your PullRequest in github you can select which will be your branch used as "base"
深入研究我发现,当您在 github 中创建 PullRequest 时,您可以选择哪个分支用作“基础”