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

Re: Move commits not in origin to a branch

From
SWshawn wilson <ag4ve.us@gmail.com>
Date
Mar 2, 2015, 15:43 UTC
Message-ID
<CAH_OBicLoSvnKx=2Y1oHCbXK+mUsKpg-TNwMfiaYs816kfsrwA@mail.gmail.com>
In-Reply-To
<54F479A1.300@drmicha.warpmail.net>

On Mon, Mar 2, 2015 at 9:54 AM, Michael J Gruber <git@drmicha.warpmail.net> wrote:

Show 16 quoted lines
> shawn wilson venit, vidit, dixit 02.03.2015 14:25:
>> How do I move commits I haven't pushed into a new branch?
>>
>>  % git log origin..master --pretty=format:'%h'
>> f7d3a19
>> 1f186c9
>> 66d99f6
>>
>> Which I'd like to be in a new branch.
>>
>
> Do you want them to be on the new branch as they are, i.e. as commits
> built on top of master? Then
>
> git branch mybranch master
>

Oh cool, I think that's what I wanted. I didn't realize it was that easy - I said screw it and went and pushed them, but... for next time (or I'll stop being stupid and work in a branch from now on).

Thanks
Previous: Michael J Gruber
Message 3 of 3 in “Move commits not in origin to a branch”
  1. shawn wilsonMar 2, 2015
  2. Michael J GruberMar 2, 2015
  3. shawn wilsonMar 2, 2015

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.