git stash

since 2013-04-21

作業を隠す

bzr shelve みたいな機能。

変更を棚上げする

$ git stash save

戻すのは git stash pop で。

どうやら stash はリモートに push されないらしい:

http://stackoverflow.com/questions/1550378/is-it-possible-to-push-a-git-stash-to-a-remote-repository

変更をコミットしないで別ブランチに移す

変更を stash に移動

$ git stash save

番号を確認

$ git stash list

スタッシュ stash@{0} に保存されていることを確認する。

新しいブランチを作りstashの内容をそこに移す

$ git stash branch ブランチ名 stash@{0}

変更はまだ新しいブランチにコミットされていないのでコミットする

$ git commit -am "コメント"
git_stash.txt · 最終更新: 2013/06/02 21:14 by Takuya Nishimoto
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0