For example, I could just git pull and then git checkout HEAD-1. But is there a way of seeing the differences before deciding whether to git pull or not?
views:
92answers:
2
+5
A:
Do a git fetch
first to update your remote tracking branch. Then use git log ..origin
to see what has changed in the "origin" branch. Then you can do a git pull
if you are satisfied with the changes.
Greg Hewgill
2008-11-04 23:12:17
+2
A:
If you really want to avoid any trace of the remote changes getting into your repo, you can do a local git clone
, which will use hardlinks, so will take almost no extra space, and then apply Greg Hewgill’s answer to that. If you are satisfied, you can go back to the original repository and pull from the local clone to avoid going over the network, although you should follow up with a git fetch
in the original repository to make sure your remote tracking branches are up to date.
Normally, that isn’t necessary, of course.
Aristotle Pagaltzis
2008-11-05 07:28:37