[Git] 커밋되지 않은 변경 사항으로 dcommit 하는 방법

Posted by MD워시퍼
2020. 1. 13. 15:54 Study
728x90

git svn을 활용하고 있는데, 보통 개발하고 있는 상태에서 git svn rebase 할 경우, needs update 가 뜨는 경우가 많다.
이럴때는, commit을 하고 rebase 한 후에 다시 reset HEAD~1로 해서 복구를 했는데, 좋은 방법이 없을까 생각하는 도중 다음과 같은 방법을 써보려고 한다.

# git svn rebase --> "file.abs: needs update"
# git stash (save local changes away)
# git stash list (have a look at what is stashed)
# git svn rebase
# git svn dcommit
# git stash apply (back to where we were before)

ㅇ 참고자료 :  How to "git svn dcommit" with uncommitted changes