[git] “–“사용법 – commit되지 않은 파일 unstage/변경사항 취소

아래와 같이 “–“라는 표현을 사용하여 unstage 또는 변경사항을 commandline에서 취소할 수 있다.ARGUMENTDISAMBIGUATION (관련 stackoverflow) 1.gitcheckout—.와 gitcheckout.의 차이?

  1. 1) git checkout — does not work if you have only one branch. git checkout . always works.2) The double-hyphen (–) tells Git that what follows should be taken as its second argument (path), that you skipped specification of a branch.https://stackoverflow.com/a/49343276How do I discard changes in my working copy that are not in the index?stackoverflow.com

error: Content is protected !!