On Saturday, July 5, 2014 7:33:12 AM UTC+2, Matthew Johnson wrote:
> I usually only 'lurk' on this forum, since I am pretty new to Git myself, 
> too. But there are two things that stood out here I feel I need to speak up 
> about: 1) be very, very careful about following the 'guidance' from a Stack 
> Overflow post where neither the question nor any of the answers got a 
> rating higher than 3 2) rebase is NOT part of the normal Git workflow. Its 
> use should be rather rare. I cannot imagine why you would want to do it 
> after every checkout.

I agree, I would personally only bother doing it every once in a while, due 
to the overhead work. However, the more often you do it, the smaller amount 
of conflicts you'll have to deal with at a time. In a busy repository, it 
could be the right thing to do.

> In particular, the man page for git-rebase (recall that to look up git 
> commands in man, you need to add the '-') has two warnings that are likely 
> quite pertinent.
> 1) Rebasing (or any other form of rewriting) a branch that others have 
> based work on is a bad idea

As long as thread-starter is the only one using this feature branch in the 
shared repository, it should be all right.

> Taking a slightly different approach, the online Git book covering rebase (
> http://git-scm.com/book/en/Git-Branching-Rebasing) seems to imply that if 
> what you want to do can be easily done with merge, then you should do so, 
> resorting to rebase only when you want to do odd things like apply not the 
> whole current branch, but only a patch in it to another branch.

I think that's a bit old-fashioned view on things. I think we're better off 
embracing rebase as a tool earlier than later, teaching new users how and 
when to use it appropriately. There are several use-cases for rebase that I 
would classify as normal procedure:

* Doing minor commits on master for which you don't want a branch: git pull 
* Starting off on branches that you end up wanting to just rebase on master 
instead (and fast-forward onto master)
* Rebase interactive to clean up commits

You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to