Last active
August 29, 2015 14:15
-
-
Save dagezi/7480b76739eac009865b to your computer and use it in GitHub Desktop.
ぐだぐだな branchを gitを駆使して綺麗にする。 ref: http://qiita.com/dagezi/items/2b73743c237f5f4901f7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- A [*] (master trunk) | |
\- B0 - B1 - B2 (messy_branch) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout messy_branch | |
git reset master | |
git add files # stage necessary files! | |
git commit -m 'squashed!' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout master | |
git checkout -b refactor_branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- A (master) | |
|\- B99 (messy_branch) | |
\. [*] (refactor_branch) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout -p messy_branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- A (master) | |
|\- B99 (messy_branch) | |
\- C0 [*] (refactor_branch) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git checkout messy_branch | |
git rebase refactor_branch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- A (master) | |
\- C0 (refactor_branch) | |
\- B98 [*] (messy_branch) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- A (master) | |
\- C0 - C2 - C3 - C1 - C4 (refactor_branch) | |
\- B95 [*] (messy_branch) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment