git/list[1] front-page[2] threads[3] people[4] search[5] about
 

RE: Copy branch into master

From
RERon Eggler <ron.eggler@gmail.com>
Date
Nov 28, 2011, 19:08 UTC
Message-ID
<3655DADD9B52450B81B0CD34F1B0FAB6@bny.us.bosch.com>
In-Reply-To
<20111128183616.GB29503@foghorn.codeweavers.com>
Thanks for that,
I guess I'd go for renaming DVT to master.

However, I also played around with merge a little, started a merge (in Windows GUI) and aborted it but the icon of my directory keeps showing the ywellow exclemation mark, signing that a merge is going on right now but going into the directory, all the files are with a geen check mark. What's going on here? How do I resolve this - I don't wanna mess things up so I might rather resolve this before moving DVT to master.

Thanks, Ron

-----Original Message-----
From: Andrew Eikum [mailto:aeikum@codeweavers.com] 
Sent: Monday, November 28, 2011 10:36 AM
To: Ron Eggler
Cc: git@vger.kernel.org
Subject: Re: Copy branch into master
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
Show 5 quoted lines
> 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

Retain old master (like 'mv master old_master; mv DVT master'): $ git checkout --detach HEAD $ git branch -m master old_master $ git branch -m DVT master $ git checkout master

The "checkout --detach" is just so Git doesn't complain about moving/deleting the currently checked out branch.

If you haven't yet, be sure to read ProGit, which should make questions like this trivial for you to answer yourself in the future: <http://progit.org/book/>

Hope this helps, Andrew

Previous: Andrew EikumNext: Andrew Eikum
Message 3 of 7 in “Copy branch into master”
  1. Ron EgglerNov 28, 2011
  2. Andrew EikumNov 28, 2011
  3. Ron EgglerNov 28, 2011
  4. Andrew EikumNov 28, 2011
  5. Ron EgglerNov 28, 2011
  6. Neal KreitzingerDec 1, 2011
  7. Tay Ray ChuanNov 29, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.