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

Re: Correcting forgetting to make a new branch

From
Howard Miller <howard@e-learndesign.co.uk>
Date
Mar 11, 2011, 15:53 UTC
Message-ID
<AANLkTikjonZxcHk3a4HvEhiDfcBqwgpqzFP2F=8tF7qv@mail.gmail.com>
In-Reply-To
<vpqk4g57j1h.fsf@bauges.imag.fr>
Show 13 quoted lines
> "Alexey Feldgendler" <alexeyf@opera.com> writes:
>
>> However, the branch that was active before when you should have
>> branched will have been unintentionally updated. To fix that, you'll
>> need to move the old branch a few commits back:
>>
>> git branch -f <old-branch> <where-it-was-before>
>
> This is correct, but for completeness: don't do that if you've already
> pushed your changes. If you pushed them and people already pulled them,
> you can hardly do better than appologize to your co-workers that you
> shouldn't have done that, and possibly create a new commit on top of the
> branch reverting what you did.
I hadn't (luckily), so that worked fine. Thanks for your help - both of you :)
Previous: Matthieu MoyNext: Michael J Gruber
Message 4 of 5 in “Correcting forgetting to make a new branch”
  1. Howard MillerMar 11, 2011
  2. Alexey FeldgendlerMar 11, 2011
  3. Matthieu MoyMar 11, 2011
  4. Howard MillerMar 11, 2011
  5. Michael J GruberMar 11, 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.