lilypond-devel
[Top][All Lists]
Advanced

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

Re: Branch management


From: Urs Liska
Subject: Re: Branch management
Date: Fri, 12 Aug 2016 07:27:40 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0


Am 12.08.2016 um 07:21 schrieb littlesincanada:
> Hi,
>
> On 11/08/16 21:18, David Kastrup wrote:
>> littlesincanada <address@hidden> writes:
>>
>>> On the face of it, a rebase is the obvious solution, but I'm told that
>>> it's a cardinal sin to rebase commits that have already been pushed.
>> So forget about that cardinal sin and just rebase.  You'll find that
>> you'll no longer be able to push the rebased branch since it is not a
>> fast forward.  So you first need to delete and then repush it, like
>>
>> git push origin :refs/heads/dev/rlittle
>> git push origin HEAD:refs/heads/dev/rlittle
>>
>> Of course, make very sure that your current HEAD is in the state you
>> want to see remotely before doing the deletion.
>>
> Ah, I see. Delete the remote branch and repush a new branch from the
> current master head.
> OK, I will give it a try tomorrow sometime. Many thanks.

If, as you say, you only have one commit on your branch you can also
just copy that commit to a new branch and later delete the old branch:

git checkout master
git checkout -b my/new/branch
git cherry-pick commit-id-from-old-branch

... later ...
git branch -D dev/rlittle
git push origin :refs/heads/dev/rlittle

This *may* "feel" somewhat safer without the rebasing.
Urs
>
> Cheers,
> Ralph
>
> _______________________________________________
> lilypond-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-devel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]