[240128] Git pull 전략 (default, –ff -only, –rebase)
Git pull 전략 (default, –ff -only, –rebase)
—ff -only
git pull 은 기본적으로 git marge FETCH_HEAD 와 같이 동작한다.
즉, 기본 모드의 경우 git merge commit 이 생성하게 된다.
—rebase
새 브랜치가 시작된 분기점 commit 이 기준 브랜치의 가장 최근 commit으로 변경한다.
git pull 시 발생하는 warning 해결하기(Need to specify how to reconcile divergent branches)
힌트: You have divergent branches and need to specify how to reconcile them.
힌트: You can do so by running one of the following commands sometime before
힌트: your next pull:
힌트:
힌트: git config pull.rebase false# merge
힌트: git config pull.rebase true# rebase
힌트: git config pull.ff only # fast-forward only
힌트:
힌트: You can replace "git config" with "git config --global" to set a default
힌트: preference for all repositories. You can also pass --rebase, --no-rebase,
힌트: or --ff-only on the command line to override the configured default per
힌트: invocation.
Leave a comment