2013-01-02 3 views
0

은 그래서 검색해보세요 http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html는 자식이 -i 리베이스 사용

의 지침을 사용하여 커밋 분할을 시도하고 그것이 당신이로 분할 할 커밋 마크 "를 말한다가

"분할 커밋 " 행동 "편집". "

어떻게해야합니까 정확히 어떻게 그

나는 자식이이 파일을 열 -i 리베이스 실행

# Commands: 
# p, pick = use commit 
# r, reword = use commit, but edit the commit message 
# e, edit = use commit, but stop for amending 
# s, squash = use commit, but meld into previous commit 
# f, fixup = like "squash", but discard this commit's log message 
# x, exec = run command (the rest of the line) using shell 
# 
# These lines can be re-ordered; they are executed from top to bottom. 
# 
# If you remove a line here THAT COMMIT WILL BE LOST. 
# However, if you remove everything, the rebase will be aborted. 
# 
# Note that empty commits are commented out 

... 
내가하려고 할 때

는 정확히 어떻게 내가,

문제는 ...

그래서 내 지역의 repo에 성공적으로 최선을 다하고 리베이스 관리하는 대화

편집에서 해당 명령을 실행 않는다 밀어 넣으려면 오류 메시지가 표시됩니다.

! [rejected]  JJ-4322 -> JJ-4322 (non-fast-forward) 
! [rejected]  master -> master (non-fast-forward) 
error: failed to push some refs to 'url.git' 
hint: Updates were rejected because the tip of your current branch is behind 
hint: its remote counterpart. Merge the remote changes (e.g. 'git pull') 
hint: before pushing again. 
hint: See the 'Note about fast-forwards' in 'git push --help' for details. 

아이디어가 있습니까?

+1

위의 행은 커밋 목록입니다. 첫 번째 열의 단어를 변경하십시오. –

+1

커밋 목록을 한 줄에 하나씩 가져와야합니다. 해당 커밋에 사용할 명령을 각 줄 앞에 추가하십시오. –

답변

0

rebase -i COMMIT 

커밋의 목록을 발표 할 예정이다, 당신은

edit 6d6da13 0000, liquibase, fixing build snafu's 

# Rebase c56baf2..6d6da13 onto c56baf2 

편집되다

pick 6d6da13 0000, liquibase, fixing build snafu's 

# Rebase c56baf2..6d6da13 onto c56baf2 

이 목록에 하나와 기본 선택 명령을 변경할 수 있습니다 :

두 번째 질문은 기록을 다시 쓰고 있고 현재 현재 상태와 충돌하는 이전 버전을 이미 푸시했기 때문입니다. 다음을해야합니다 :

git push --force YOURBRANCH 

리모컨의 내용을 덮어 씁니다.