ストーリーとしては、 $ vi main.rb ... $ vi newclass.rb ... $ git commit -a -m '一部機能をNewClassに分離' $ vi main.rb $ git commit $ vi sub.rb $ git commit ... $ git status # Untracked files: # (use "git add <file>..." to include in what will be committed) # # newclass.rb $ うっ bash: うっ: command not foundみたいなケースですね。 bash: うっ: command not found # 「本来そのファイルを入れるはずだったコミット」の手前までを指定してrebase -i $ git rebase -i HEAD~~~~~ #