4 ms·
Quick, what does git pull foo do if foo is a branch vs a remote and how do you fix it if you messed up/which is preferred when both exist?
by wbl 1y ago
Quick, what does git pull foo do if foo is a branch vs a remote and how do you fix it if you messed up/which is preferred when both exist?
- koiueo 11mo agoI've never encountered this case in real life, so I don't know. Maybe I'll try later out of curiosity. But whatever state I'm in, I'm sure I can reset back to where I were using reflog.
- 1718627440 11mo ago> if foo is a branch It does `git pull <default remote> foo`. > vs a remote It gives an error, because you haven't specified the remote. I don't know what behaviour you find intuitive here? > how do you fix it if you messed up/which is preferred when both exist? git pull is YOLO mode, so I never do it, but I would just reset the branches where I want them to be? You get a summary with the old and new commit hashes, so resetting is really easy.