試圖從git repo中獲取,但獲取以下輸出。我認爲這些文件被跟蹤(如他們應該),但它表明它們不是。他們不在.gitignore。我大約有5-10分支落後。由於(據說)未跟蹤文件導致文件覆蓋的Git警告
git pull --rebase origin master
From github.com:user/Project
* branch master -> FETCH_HEAD
First, rewinding head to replay your work on top of it...
error: The following untracked working tree files would be overwritten by checkout:
mountdoom/protected/models/UserHelper.php
mountdoom/protected/models/UserRegistrationForm.php
mountdoom/protected/runtime/state.bin
mountdoom/protected/views/site/register.php
Please move or remove them before you can switch branches.
Aborting
could not detach HEAD
任何想法如何解決這個問題?
git merge沒有'-f'選項 –
@Jamie,true。 git pull的確如此,但你說得對,它不適用(似乎只適用於獲取部分)。 –