我有一個以前名爲Favourite.rb的文件 - 我在我的代碼編輯器中將它重命名爲favourite.rb我推送了我的更改並注意到bitbucket中該文件仍然是「 Favourite.rb」。我正在運行mac osx - 並且聽說它不是大小寫敏感的文件系統。所以我試着完全重命名這個文件 - 強制git獲取更改。還是行不通。我試圖添加該文件,並且還嘗試了git mv,其中git說它不在版本控制之下......但是我已經添加了它?那麼發生了什麼!Git更改文件名已導致它不被跟蹤
請幫助:
Andys-MacBook-Pro:models andy$ ls
age_collection.rb category.rb favourite.rb mention.rb user.rb
age_range.rb concerns follow.rb session.rb visit.rb
ahoy event.rb invitation.rb sub_category.rb
attendee.rb event_category.rb like.rb test.rb
Andys-MacBook-Pro:models andy$ git add .
Andys-MacBook-Pro:models andy$ git commit -am "all up to date"
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean
Andys-MacBook-Pro:models andy$ git mv favourite.rb foo.rb
fatal: not under version control, source=app/models/favourite.rb, destination=app/models/foo.rb
Andys-MacBook-Pro:models andy$
你有沒有'commit'後' git mv'? –
'git status'顯示什麼? –