Skip to content

Git:Checkout

What is "--"

문법상에 --라는 부분이 존재한다. 사용방법은 아래와 같다.

git checkout -- <paths>

이 부분은 help page를 통해 --ignore-skip-worktree-bits옵션에 해당하는 것을 확인할 수 있다. 설명은 아래와 같다.

In sparse checkout mode, git checkout -- <paths> would update only entries matched by <paths> and sparse patterns in $GIT_DIR/info/sparse-checkout. This option ignores the sparse patterns and adds back any files in <paths>.