Re: fast forward a branch from another
- From
Junio C Hamano <gitster@pobox.com>
- Date
- May 12, 2011, 16:06 UTC
- Message-ID
- <7vsjsjdhud.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <BANLkTi=PtkDp8PNdMNi3hTwHPjFg+Jtftw@mail.gmail.com>
Eric Frederich <eric.frederich@gmail.com> writes:
Show 7 quoted lines
> Often times I get into a situation where I have a "development" branch > that gets ahead of say a "stable" branch. > When I am ready to call the development branch stable this is what I do. > > $ git checkout stable > $ git merge development > $ git checkout development
Instead of switching to "stable", while still on the development, you could do
$ git push . HEAD:stable
which would succeed only when you are purely ahead of stable (otherwise it will fail as you are not forcing).