相关疑难解决方法(0)

如何比较Visual Studio代码上的不同分支

如何比较Visual Studio代码1.9上的不同分支?可能吗?

git visual-studio-code

55
推荐指数
8
解决办法
5万
查看次数

使用GitHub拉取请求的正确git配置是什么?

我知道如何查看GitHub拉取请求?

虽然添加fetch = +refs/pull/*/head:refs/remotes/origin/pr/*.git/config允许获取和结帐,但拉动操作失败:

[remote "origin"]
    url = https://github.com/the/repo.git
    fetch = +refs/heads/*:refs/remotes/origin/*
    fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
Run Code Online (Sandbox Code Playgroud)

获取和结帐工作正常:

$ git fetch origin
Run Code Online (Sandbox Code Playgroud)

... 都好

$ git checkout -b "pr-123" origin/pr/123
Branch pr-123 set up to track remote branch pr/123 from origin.
Switched to a new branch 'pr-123'
Run Code Online (Sandbox Code Playgroud)

...成功,得到了代码!

但拉动失败:

$ git pull
Your configuration specifies to merge with the ref 'refs/heads/pr/123' 
from the remote, but no such ref was fetched.
Run Code Online (Sandbox Code Playgroud)

......失败了.

我可以手动指定ref:

$ git pull origin refs/pull/123/head …
Run Code Online (Sandbox Code Playgroud)

git github pull-request

19
推荐指数
2
解决办法
759
查看次数

标签 统计

git ×2

github ×1

pull-request ×1

visual-studio-code ×1