简体   繁体   中英

Git pull and fetch is not updating one of my branches

I have two branches on remote and I'm only working on the 'trampo' branch with a friend:

git branch -a
   master
 * trampo
   remotes/origin/master
   remotes/origin/trampo

doing a git fetch and git pull is not retrieving the work done yesterday on the 'trampo' branch... how am I supposed to do this?

(I tried the git --track, and checkout on remotes/origin/trampo creates this detached head state that does not seem to hold changes, I dont want to create a new branch too...)

You have to set the remote tracking branch:

git branch -u origin/trampo

For more information see: How do you make an existing Git branch track a remote branch?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM