나는 "feature
"지점에 있습니다. 모든 변경 작업을 마친 후이 지점에서 작업하기로 결정했습니다. 위에서 보듯이내 경우에 위트 커밋
On branch feature
# Changes not staged for commit:
# (use "git add <file>..." to update what will be committed)
# (use "git checkout -- <file>..." to discard changes in working directory)
#
# modified: MyApp/src/Main.java
# modified: MyApp/src/Model.java
# Untracked files:
# (use "git add <file>..." to include in what will be committed)
#
# MyApp/src/other/file1
# MyApp/src/other/file2
이 두 이 있습니다 : 위의 자식 명령은 다음과 같은 결과를 인쇄
git status
:
내가 먼저 내가 실행 명령에 의해 만들어진 모든 변경 사항을 확인 추적되지 않은 파일 file1
및 file2
. 내 git 저장소에 저장하고 싶지 않습니다. 하지만이 두 파일을 잊었 어떤 이유로 &에 의해 직접 내 변화를 약속 :이 시점에서
git add .
git commit -m "Some changes"
, file1
& file2
을 포함한 모든 변경 사항이 최선을 다하고 있습니다. 자, 어떻게 구할 수 file1
& file2
제외 여전히 다른 수정 된 변경 사항을 커밋 유지?
당신이 최선을 다하고 그리고 당신이 그 파일을 추가하고 싶지 않았다 실현, 당신이 같이 해결할 수 있습니다 후
https://www.kernel.org/pub/software/scm/git/docs/git-reset.html에서 commti 및 redo를 실행 취소하십시오. – dekdev