Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

`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.



Ufff, 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.


What 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.


If you're really having trouble using git rebase the escape hatch is git rebase --abort




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

Search: