Thread (7 messages) flat view 7 messages, 3 authors, 2016-06-15

Re: [PATCH v2] git checkout -b: unparent the new branch with -o

From: Erick Mattos <hidden>
Date: 2016-06-15 22:48:25

Resending orphan branch 'cheat sheet' again.  Gmail screwed it in
previous email.  See this using a fixed font:

Branch_A
|
You realize that you need a new empty branch.
|
Is the work tree clean?
|               |
Yes             No
|               |
git clean -ob Branch_B -------Undo?-------Was the work tree clean before?
|                                                 |      |
|                                                 Yes    No
|                                                 |      |
|                                                 |      git add .
|                                                 |      git commit -m temp
|                                                 |      |
|                                                 +------+ git
checkout Branch_A -f
|                                                        |
|                                                        git merge
--squash Branch_B
Do you want to use anything from the work tree?          |
|               |                                        git reset
Yes             No                                       git branch -D Branch_B
|               |
|               git clean -df
|               |
Change the work tree the way you want it to be.
|
git add .
git commit
|
That is it!
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help