두 원격 ('origin'은 내부 개발 용이고 'other'는 외부 계약자 용입니다)이있는 로컬 git 저장소가 있습니다. 로컬 저장소의 마스터 브랜치가 올바른 '원본'의 마스터를 추적합니다. 또한 '기타'에서 마스터를 추적하는 '외부'지점이 있습니다. 내가 지금 가지고있는 문제는 내 주인공이 '기타'의 주인에게도 밀기를 원한다는 것인데, 이것이 문제입니다. 로컬 마스터가 다른/마스터로 푸시해야한다고 지정할 수있는 방법이 있습니까?기본적으로 마스터 브랜치를 모든 리모컨으로 푸시하지 못하게 할 수 있습니까?
나는 이미 포함하도록 내 .git/config 파일을 업데이트 시도했다 :
toko:engine cmlacy$ git remote show origin
Password:
* remote origin
Fetch URL: <REPO LOCATION>
Push URL: <REPO LOCATION>
HEAD branch: master
Remote branches:
master tracked
refresh-hook tracked
Local branch configured for 'git pull':
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)
사람들은 모두 올바른 :
[branch "master"]
remote = origin
merge = refs/heads/master
[branch "external"]
remote = other
merge = refs/heads/master
[push]
default = upstream
그러나 remote show
여전히 내 주인은 모두 리모컨으로 추진하고 있음을 보여줍니다 .
toko:engine cmlacy$ git remote show other
Password:
* remote other
Fetch URL: <REPO LOCATION>
Push URL: <REPO LOCATION>
HEAD branch: master
Remote branch:
master tracked
Local branch configured for 'git pull':
external merges with remote master
Local ref configured for 'git push':
master pushes to master (local out of date)
마지막 절이 문제입니다. '외부'는 다른/master와 병합해야하지만 master는 결코 다른/master로 밀어 넣으면 안됩니다. 일하는 일이 절대로 없을 것입니다. 밀어 곳
완벽. 감사! – Curtis