[英]how to request pull request from a particular remote in git?
这是我的git配置文件的样子:
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = false
[remote "origin"]
url = git@github.com:XXXXXXX/training.test.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "upstream"]
url = https://github.com/YYYYYYY/training.test.git
fetch = +refs/heads/*:refs/remotes/upstream/*
remote
“来源”指向我的github帐户remote
“上游”指向与我分叉到我的github帐户不同的github帐户。
Q1:所以每次我执行git pull
,它将从我的remote
(即“原点”)中pull
。 我将如何对remote upstream
进行git pull
。
问题2:我commit and push
送到存储库的任何更改,都必须通知其他用户“ YYYYY”以进行拉取请求。 我将如何实现呢?
git pull remoterepo remotebranch[:localbranch]
(例如git pull upstream foo:bar
, git pull pustream foo
)
或git checkout --track upstream/remotebranch
如果本地git checkout --track upstream/remotebranch
没有这样的名为remotebranch
的分支,请git checkout --track upstream/remotebranch
分支
您可以使用git branch -r
显示远程git branch -r
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.