나는 내가 끌어 오기 요청하기 전에 어떤 점에서 나뭇 가지에 개발 :자식 : 이상한 힘 푸시 동작
$> git checkout myBranch
$> git pull
$> git rebase origin/master
# fix conflicts and --continue
$> git push --force
warning: push.default is unset; its implicit value is changing in
Git 2.0 from 'matching' to 'simple'. To squelch this message
and maintain the current behavior after the default changes, use:
git config --global push.default matching
To squelch this message and adopt the new behavior now, use:
git config --global push.default simple
See 'git help config' and search for 'push.default' for further information.
(the 'simple' mode was introduced in Git 1.7.11. Use the similar mode
'current' instead of 'simple' if you sometimes use older versions of Git)
Counting objects: 21, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (11/11), done.
Writing objects: 100% (11/11), 1.59 KiB | 0 bytes/s, done.
Total 11 (delta 8), reused 0 (delta 0)
To [email protected]:bar/foo.git
+ 64f1387...ed6f9be myBranch -> myBranch (forced update)
+ ccaadf5...42e0c8d master -> master (forced update)
여기서 문제는 마지막 라인, 마스터에 힘 푸시입니다. 이것은 일어나서는 안된다. 나는 밀어 넣기를 강제로 myBranch
으로하고 싶었다. 하지만 전부는 아니지만, 마스터에 대한 강제 추진으로 인해 이제는 커밋의 마지막 몇 가지를 놓친 마스터 브랜치가됩니다. 나는 단지 pull
을했기 때문에 어느 것이 이상하다고 생각한다. 누군가가 나에게 무슨 일이 일어 났는지 설명 할 수 있습니까? 내가 치료가 모든 지점을 밀어 정보
$> git config --global push.default simple
및/또는
$> git push --force origin/myBranch
thnx 많이! 저에게있어서 새로운 점은 당신이'myBranch'에있을 때'git fetch'를 할 때 master에게 돌아가서 master에게 최신 커밋을 받기 전에'git pull '을해야한다는 것입니다. 나는 이것이 HEAD의 위치와 관련이 있다고 생각합니다. 그래서 실제로 이해가됩니다! –
@JeanlucaScaljeri : 그래서 나는 'git pull'을하지 않습니다. 나는'git fetch'를 빈번히 (로컬 브랜치를 건드리지 않기 때문에)하고, 필요할 때'git merge/rebase'를합니다. – rodrigo