HexoのソースはBitbucketで管理しているが、Hexoのテーマを変えたところ、commit出来なくなった。

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)
  (commit or discard the untracked or modified content in submodules)

    modified:   themes/freewill (modified content, untracked content)

no changes added to commit (use "git add" and/or "git commit -a")

と表示される。

Bitbucketのソースを見ると、新しいテーマのディレクトリthemes/freewillは追加はされているが、クリックして開くことが出来ない。
何度かやり直してみたが、うまく行かない。

ためしに適当なファイルを一つpushしたらどうかと、

$ git add themes/freewill/LICENSE
$ git commit -m '修正'
$ git push

とやったらLICENSEが追加され、freewillを開くことが出来た。
その後もう一度git add .し、commit、pushしたら、他のファイルやディレクトリも追加された。

そう言えばリポジトリに初めてcommitした時も、一度contributors.txtというファイルをpushしてからでないとうまく行かなかった。
Gitというのはいきなりディレクトリ全体を追加するのは出来ない仕様のようだ。

表示   このエントリーをはてなブックマークに追加

Comments

2014年12月1日