'git push'로 인해 두 가지로 커밋을 시도 할 수 있습니까? 나는 공유하고있는 repo에있는 내가 일하고있는 나의 자신의 가지를 가지고있다. .. 그리고 master branch. 지금 당장 나는 개인 지점으로 밀고 싶었지만 잘 지내기 위해 노력했지만 거부 당했다.git push에서 git이 두 개의 브랜치를 사용하는 이유는 무엇입니까?
foo$ git push
Counting objects: 38, done.
Delta compression using 2 threads.
Compressing objects: 100% (19/19), done.
Writing objects: 100% (21/21), 9.73 KiB, done.
Total 21 (delta 14), reused 0 (delta 0)
To ssh://example.com/project.git
8184634..86b621e mybranch -> mybranch
! [rejected] master -> master (non-fast forward)
error: failed to push some refs to 'ssh://example.com/project.git'
내 설정은 다음과 같습니다 :
remote.origin.url=ssh://example.com/project.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
branch.mybranch.remote=origin
branch.mybranch.merge=refs/heads/mybranch
에스코 그들이 내 설정에있어 있기 때문에 모두 밀어 있다는 지적이 뭔가를 보았다. 두 가지 방법을 동시에 추진하고 싶지 않은 경우 어떻게해야합니까? 나가 나의 기관을 체크 아웃하고 나가 git 밀기를 가지고있을 때, 나는 주인이 아닌 mybranch를 밀기 위하여 명확하게 의미한다. 체크 아웃 마스터, 코드 편집, 커밋/푸시하려는 경우가 있습니다. 공존 할 수있는 방법이 있습니까?
도 아닌 내가이에 그냥 둘 모두를 밀어하려는 경우 같은 시간?mybranch 만 밀어 넣기를 원할 때가 있습니다. mybranch를 master로 병합하고 master를 push하려고 할 때가 있습니다. 이 경우에 무엇을합니까? – Coocoo4Cocoa
"git push"형식을 사용하여 푸시하려는 분기의 이름을 항상 명시 적으로 지정할 수 있습니다. http://www.kernel.org/pub/software/scm/git/docs/git-push.html –
최신 버전의 자식을 사용하면이 동작을 지정할 수 있습니다. – Dustin