a 'git pull' command works like 'svn update'? a 'git pull' command works like 'svn update'? git git

a 'git pull' command works like 'svn update'?


If you want a pull to merge with changes you have made locally, you will need to commit your changes to your local directory first. Or, stash your changes, then pull, then re-apply your stash.


I think what you want to do is:

  1. commit all changes to your local repository
  2. do a 'git rebase'.

This is slightly better than 'svn update' in my opinion, because it will first change your local working copy to the way it was the last time you pulled or rebased from the remote, then fetch and apply new changes from the remote, and then reapply your locally committed changes. If there's a conflict between your changes and the remote changes, you'll need to resolve them and follow the prompts to continue the rebase operation.

This way the changesets should be applied in the right order.