개발관련/Git
Git으로 브랜치에 변경된 여러 파일 중 하나만 숨길 수있는 방법
Rateye
2021. 10. 1. 12:17
728x90
반응형
질문 : Git으로 변경된 여러 파일 중 하나의 파일 만 숨기시겠습니까?
브랜치에 변경된 여러 파일 중 하나만 숨길 수있는 방법은 무엇입니까?
답변
git stash push -p -m "my commit message"
-p
은닉해야 할 덩어리를 선택합니다. 전체 파일도 선택할 수 있습니다.
각 덩어리에 대해 몇 가지 작업을 묻는 메시지가 표시됩니다.
y - stash this hunk
n - do not stash this hunk
q - quit; do not stash this hunk or any of the remaining ones
a - stash this hunk and all later hunks in the file
d - do not stash this hunk or any of the later hunks in the file
g - select a hunk to go to
/ - search for a hunk matching the given regex
j - leave this hunk undecided, see next undecided hunk
J - leave this hunk undecided, see next hunk
k - leave this hunk undecided, see previous undecided hunk
K - leave this hunk undecided, see previous hunk
s - split the current hunk into smaller hunks
e - manually edit the current hunk
? - print help
출처 : https://stackoverflow.com/questions/3040833/stash-only-one-file-out-of-multiple-files-that-have-changed-with-git
728x90
반응형