Skip to content

Commit

Permalink
modify : Remote-tracking branch
Browse files Browse the repository at this point in the history
add content about unset remote tracking branch
  • Loading branch information
woongjoonchoi committed Dec 23, 2023
1 parent cc7f5ca commit 21d64ea
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,13 @@ git clone을 하게 되면 자동적으로 리모트 트래킹 브랜치 `origin

현재 브랜치를 트래킹 브랜치로 사용하고 싶으면 `git branch -u <remote><branch>` 명령어를 사용하면 , 현재 브랜치를 트래킹 브랜치로 설정하게 됩니다. 이때 , `-u` 대신에 `--set-upstream-to` 라는 옵션을 사용해도 됩니다.

트래킹 브랜치로 설정한 브랜치에 대해 트래킹을 취소할려면 `git branch <branch> --unset-upstream` 명령어를 사용하면 됩니다.

트래킹 브랜치에 대한 정보를 보기 위해서는 `git branch -vv` 라는 명령어를 사용하면 됩니다. 이는 로컬 트래킹 브랜치 목록들을 보여주는데 , 로컬 트래킹 브랜치가 앞서가는지 뒤쳐지는지를 보여줍니다.




## git pull

git pull 명령어에 대해서 주의할 점은 이 명령어가 git fetch + git merge를 합한 동작을 수행하는 명령어라는 것입니다. git fetch는 서버로 부터 로컬에 없는 최신 데이터를 받아옵니다. 그리고, git merge는 이 데이터를 현재 브랜치와 merge를 하게 됩니다.
Expand Down

0 comments on commit 21d64ea

Please sign in to comment.