GetComponents should use "git pull --rebase" for updating

Issue #138 closed
Erik Schnetter created an issue

To update a git repository, one should issue the following commands in this order:

git stash git pull --rebase git stash apply

If this is not done, the update either fails, or generates many additional patches to handle merge conflicts.

Keyword:

Comments (4)

  1. Ian Hinder
    • removed comment

    This happens if you have local changes (committed or uncommitted) in your repository directory. If we say that we want to support this automatically, then we should also do the same for SVN. When doing an update, if conflicts are found the user should be warned about this. The commands Erik listed are the correct thing to do, but beware that they will not automatically all work. The git pull --rebase can fail if there are local commits conflicting with remote commits, and the git stash apply can fail if the working copy conflicts with remote commits. Detecting these failures and doing something sensible to warn the user would be important to avoid confusion. This is a generalisation of the same problem that happens with SVN when the working copy conflicts with remote updates.

  2. Log in to comment