나는 지점 에서 작업 중이었고 일부 변경 사항을 적용했지만 변경 사항은 로컬에만 적용했지만 푸시되지 않았습니다. 그럼 하나의 긴급 문제를 해결하고, 다른 지점으로 전환 B 그리고 일부 변경 사항을 수행하고 변경 사항을 적용하고 푸시해야합니다. 분기에서 변경 한 사항이 다른 분기에 표시되는 이유는 무엇입니까?
나는이 지점 대신 지점 B의에 최선을 다하고 된 하나의 파일 변화를 보여주는 한 가지 B에서 내 로그를 참조
.Commands that I have executed.
$git status // shows the 2 files that was changed in branch A
$git add -A // add those 2 files that was changed.
$git commit -m "intermediate commit" // need to push later when my current feature will be completed.
$git checkout branch B // switched to second branch
$git status // one file that was changed in branch B
$git add -A // add that file
$git commit -m "imediate issue is fixed"
$git push origin B // push those changes.
분기
B 변경되었습니다 지점
한 변경되었습니다 두 개의 파일이 변경이 있었다 지점
B의 로그를 참조하십시오.
내 지사 변경 사항이 지점에 반영되었습니다. ?
"어떻게 다른 지점 B로 전환 했습니까?" –
파일이 A와 B 모두 변경 되었습니까? – merlin2011
전환을 위해 ** git checkout B ** 명령을 사용했습니다. – Suleman