Skip to content

Instantly share code, notes, and snippets.

@kitsuyui
Created July 15, 2015 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kitsuyui/6c209bd7af7103e9f45b to your computer and use it in GitHub Desktop.
Save kitsuyui/6c209bd7af7103e9f45b to your computer and use it in GitHub Desktop.
Git でややこしい操作する前にブランチに新しい名前をつければ混乱しない(と思う) ref: http://qiita.com/kitsuyui/items/1981708e007bf4cf5662
$ git init
$ git commit --allow-empty -m 'Initial commit'
$ git checkout -B some-wip-feature
$ touch a
$ git add a
$ git commit -m 'Add a'
$ touch b
$ git add b
$ git commit -m 'Add b'
$ git checkout master
$ git checkout -B some-clean-feature
$ git merge --squash some-wip-feature
$ git commit -m 'Add some feature'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment