git TortoiseGit:推送到新的远程分支

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/7084798/
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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 05:50:19  来源:igfitidea点击:

TortoiseGit: Push to new remote branch

gittortoisegit

提问by alastairs

I've set up a project to use TeamCity and Git, and I'd like to use TeamCity's new Branch Remote Run feature. The way this work is to push your working directory to a remote branch that the TeamCity build is watching, e.g.:

我已经建立了一个项目来使用 TeamCity 和 Git,我想使用 TeamCity 的新分支远程运行功能。这项工作的方式是将您的工作目录推送到 TeamCity 构建正在监视的远程分支,例如:

git push origin +HEAD:remote-run/my_feature

What I thinkthis is saying is "push HEADto the remote branch remote-run/my_featurein the originrepository, creating it if necessary" (I would welcome clarification if that's even slightly incorrect).

认为这是在说“推HEAD送到存储库中的远程分支remote-run/my_featureorigin必要时创建它”(如果这有点不正确,我欢迎澄清)。

My problem is that I'm using TortoiseGit with MSysGit set up to use PuTTY. This is working fine, but it means I can't drop into Git Bash and issue the command through the command-line as Git Bash relies on OpenSSH. I'm not up for re-installing MSysGit (and potentially TortoiseGit too).

我的问题是我使用 TortoiseGit 和 MSysGit 设置为使用 PuTTY。这工作正常,但这意味着我无法进入 Git Bash 并通过命令行发出命令,因为 Git Bash 依赖于 OpenSSH。我不准备重新安装 MSysGit(也可能是 TortoiseGit)。

So, what's the magical set of checkboxes and textboxes to get TortoiseGit to run a push as described above?

那么,让 TortoiseGit 如上所述运行推送的神奇复选框和文本框是什么?

采纳答案by Andy

First make sure pageant is running and has your key loaded... Then you can set the windows env variable GIT_SSHto point to plink.exe and msysgit will use pageant. Link to walkthrough

首先确保选美正在运行并加载了您的密钥...然后您可以将 windows env 变量设置GIT_SSH为指向 plink.exe 并且 msysgit 将使用选美。演练链接