On Sat, Mar 25, 2017 at 12:22 AM, Antoine Pitrou firstname.lastname@example.org wrote:
Le 24/03/2017 à 16:11, R. David Murray a écrit :
On Fri, 24 Mar 2017 14:29:13 +0100, Antoine Pitrou email@example.com wrote:
By the way, how do I fetch remote changes for a branch without pulling it into the working copy? e.g. I'd like to do "git fetch origin 3.5" or "git fetch origin/3.5", but that doesn't seem to work...
"git fetch origin 3.5" seems to work fine for me. Maybe I don't understand what you are trying to do?
Apologies for being slightly imprecise. Yes, "git fetch origin 3.5" actually fetches the remote changes, but it doesn't update the local "3.5" branch with those changes, so when I do "git diff 3.5" from another branch, I get spurious changes in the diff.
(perhaps I should do "git diff origin/3.5" instead?)
git diff origin/3.5 is normal way. If you always use feature branch,
there are no need for local 3.5 branch.
I usually create "backport" branch by:
git checkout -b backport-xxx-35 origin/3.5.
OTOH, there is hackey way. Assuming you didn't have checkout of local
git push . origin/3.5:3.5 may update 3.5 branch.