今天第二次git commit -m "don't quit me now"
刪除了我的整個回購。所以它:git commit刪除回購中的所有文件
$ git add .
$ git commit -m "please, be gentle"
[master 7af0e9c] please, be gentle
140 files changed, 0 insertions(+), 3186 deletions(-)
delete mode 100644 .DS_Store
delete mode 100644 .gitignore
delete mode 100644 .rspec
delete mode 100644 Gemfile
...
我一直在使用Github的Mac旁邊的命令行,並想知道如果這是某種程度上讓事情。
$ git checkout
$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 1 commit.
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# deleted: .DS_Store
# deleted: .gitignore
# deleted: .rspec
# deleted: Gemfile
# deleted: Gemfile.lock
在執行'git add .'之前,您的存儲庫的狀態(通過'git status'獲得)是什麼? – 2012-04-11 05:29:22
是你的環境變量'GIT_DIR'或'GIT_WORK_TREE'集合? – VonC 2012-04-11 05:38:45
以前的這種行爲的實例並不是非常豐富:http://stackoverflow.com/questions/6180151/git-commit-without-file-name-and-without-a。如果你克隆你的repo,那麼問題是否會持續存在,並嘗試在那裏進行修改和提交? – VonC 2012-04-11 05:39:49