11

I'm trying to following the instructions on https://help.github.com/articles/using-git-rebase-on-the-command-line/ for interactively rebasing from my initial commit (More specifically, I'm trying to remove all the bin and obj folders from the history). So once I type in

git rebase -i --root

I get the following screen as expected, but then I can't figure out how to change the first one to edit. Like I can't figure out which button on the keyboard to click. Sorry if this is a stupid question.

enter image description here

user7127000
  • 3,143
  • 6
  • 24
  • 41
  • Check out the basic VIM commands, video tutorials are pretty handy. – hkarask Mar 31 '17 at 07:43
  • probably [this](http://stackoverflow.com/questions/1634161/how-do-i-use-notepad-or-other-with-msysgit) should be useful to you – max630 Mar 31 '17 at 11:25

1 Answers1

10

Thats pretty easy. You have to change the word pick to edit Then you save the file, in your case press ESC and then type :wq. Then git will start the rebase and you will stop on each commit you want to edit.

Edit: If you don't know how to insert in vim: press ESC and then i after that you are in insert-mode and as soon as you are finished with typing press ESC again and save it as described above.

ckruczek
  • 2,361
  • 2
  • 20
  • 23
  • 1
    I think the OP may be in the same camp as I was; I had no idea this screen was vim. That hint alone is of great help! – Demonslay335 Feb 05 '19 at 19:12