From: Tay Ray Chuan <rctay89@gmail.com>
To: Andrew Eikum <aeikum@codeweavers.com>
Cc: Ron Eggler <ron.eggler@gmail.com>, git@vger.kernel.org
Subject: Re: Copy branch into master
Date: Tue, 29 Nov 2011 20:49:49 +0800 [thread overview]
Message-ID: <CALUzUxrxX7Av6OSb5qHMSCua-Y8dGdf8ux1yLoCwNJeXtd-kow@mail.gmail.com> (raw)
In-Reply-To: <20111128183616.GB29503@foghorn.codeweavers.com>
On Tue, Nov 29, 2011 at 2:36 AM, Andrew Eikum <aeikum@codeweavers.com> wrote:
> On Mon, Nov 28, 2011 at 10:25:33AM -0800, Ron Eggler wrote:
>> Some time ago I created a DVT branch in my project and I have almost been
>> exclusively working in it. Now the time for some test deployment came and I
>> didn't have time to merge it all back into the master thus I gave out the
>> DVT branch version. Now I would like to copy exactly what I have in that
>> branch back into my master to have an exact copy in my master of what got
>> deployed with out any changes.
>> How can I do this?
>
> Couple options, depending on what you want:
>
> Rename DVT to master (similar to 'mv DVT master', including
> losing the contents of 'master'):
> $ git checkout --detach HEAD
> $ git branch -M DVT master
> $ git checkout master
It might not be wise to take the strict definition of rename = move
(copy + delete). You will lose *all* your reflog associated with
master. The old master is gone forever.
Resetting the branch is "safer". It's like pseudo-copying the branch.
The reflog for both branches are still around. You can do this with
# on master
$ git reset --hard DVT
or
# not on master
$ git branch -f master dvt
--
Cheers,
Ray Chuan
prev parent reply other threads:[~2011-11-29 12:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-28 18:25 Copy branch into master Ron Eggler
2011-11-28 18:36 ` Andrew Eikum
2011-11-28 19:08 ` Ron Eggler
2011-11-28 19:26 ` Andrew Eikum
2011-11-28 19:30 ` Ron Eggler
2011-12-01 19:43 ` Neal Kreitzinger
2011-11-29 12:49 ` Tay Ray Chuan [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CALUzUxrxX7Av6OSb5qHMSCua-Y8dGdf8ux1yLoCwNJeXtd-kow@mail.gmail.com \
--to=rctay89@gmail.com \
--cc=aeikum@codeweavers.com \
--cc=git@vger.kernel.org \
--cc=ron.eggler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).