3 ms·
`git pull --rebase` is very useful if you use git with an authoritative remote repo, treating your own repo as having disposable history. In fact, you can make
by kemayo 14y ago
`git pull --rebase` is very useful if you use git with an authoritative remote repo, treating your own repo as having disposable history.
In fact, you can make it the default! Just do: `git config --global branch.autosetuprebase always` and every branch you create from now on will be set up to rebase without needing the manual `--rebase`.
Existing branches you can switch by doing: `git config branch.[branch-name].rebase true` in the repo.
- trust-me 14y agoUfff, I must be doing something very wrong. Once in a while rebase continue will just fail with cryptic error messages and nothing but a hard reset will let me continue using the repository. Never had a problem with regular git pull.
- X-Istence 14y agoWhat are the cryptic error messages? The only one that I know if is the message stating that the commit is empty ... In that case simple use git rebase --skip, to skip applying that patch. That tends to happen when after you fix the "merge" conflict after replaying a patch and the changeset is empty.
- MBlume 14y agoIf you're really having trouble using git rebase the escape hatch is git rebase --abort