あるディレクトリを Git でバージョン管理する場合に、最初に実行しているコマンドを紹介します。
(1) Git で管理するディレクトリに移動
$ cd path/to/dir
(2) Git管理開始
$ git init
(3) 使用するユーザー名を設定
$ git config --local user.name "foo"
(4) 使用するメールアドレスを設定
$ git config --local user.email foo@example.com
(5) 空でコミットしておく
$ git commit --allow-empty -m 'first commit'
rebase -i
で最初の編集内容に対して変更ができるようになる。