Re: nicer frontend to get rebased tree?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, 22 Aug 2008, Paolo Ciarrocchi wrote:
> 
> since tip/master is often rebased (as pu or linux-next) what I do is
> the following:
> git branch -D tip-latest
> git checkout -b tip-latest tip/master
> 
> but I guess lot of people would expect to "throw away" and "checkout
> again" with a single git command.

I would literally suggest not using a branch at all. Yes, it works, but 
this is the perfect usage case for "no branch" aka "detached head" usage, 
because "git status" will nicely tell you "Not currently on any branch" 
and "git branch" will point it out too.

So instead of using a real branch "tip-latest", just do

	git checkout tip/master

to not create a branch at all, since all you will eventually have to do is 
to delete it anyway, and saving the state for later would be actively 
wrong.

The "git checkout" will also have a nice message like

	Note: moving to "tip/master" which isn't a local branch

and about how you _can_ save the state later if you want to (even if you 
don't), which may look a bit scary, but once you get used to it it's 
actually not scary at all, but just reminds you that you did the right 
thing.

		Linus
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux