Hacker News new | past | comments | ask | show | jobs | submit login

I always run "git remote update" rather than "git pull". That fetches any updates from all remotes, without any changes to the working tree. It's great if the first thing you want to know is, "are there any new updates?"

If the answer is no, that's that.

If the answer is yes, you can immediately follow up with something like "git rebase origin master". Or not. Separate decision.

So, git's push/pull metaphor never felt like a great fit to me, since it lacks this level of control.




Instead of 'git pull' I use a combination of 'git fetch' and 'git merge'. 'git fetch origin' followed by 'git merge origin/<branch_name>' (if there are any interesting changes) keeps my current branch up to date with the changes I need. Keeping the 'merge' a separate step helps me to decide when I want to be in sync. the remote modifications.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: