Timeline for How do I make a branch point at a specific commit?
Current License: CC BY-SA 4.0
9 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jun 24 at 21:12 | comment | added | rakslice | I noticed the note about it throwing away uncommitted changes after I doing it :( Why not just give a reset command that doesn't do that, it isn't part of the question | |
Apr 21, 2023 at 9:59 | comment | added | Dominik | I have to look this up about once a month. Really unintuitive command. | |
Apr 11, 2022 at 17:27 | comment | added | czerny |
git branch -f <branch> <starting-point> by default sets <branch> to point at <starting-point> and if <starting-point> is also a branch, it sets remote tracking branch to <branch> to branch <starting-point> . To avoid adjustment of remote tracking branch, use extra option --no-track : git branch --no-track -f <branch> <starting-point>
|
|
Aug 2, 2021 at 2:42 | comment | added | remcycles |
git branch -f is useful. It's nice that I can change the branch without checking it out first.
|
|
Feb 5, 2020 at 3:56 | comment | added | ahnbizcad | you don't need --hard | |
Jul 25, 2018 at 11:35 | history | edited | mit | CC BY-SA 4.0 |
Answer first, warn later
|
Sep 5, 2011 at 15:56 | vote | accept | Ram Rachum | ||
Sep 5, 2011 at 15:52 | history | edited | Mark Longair | CC BY-SA 3.0 |
edited body
|
Sep 5, 2011 at 15:46 | history | answered | Mark Longair | CC BY-SA 3.0 |