我正在與其他幾個人合作Drupal網站,我們通過版本控制GIT。我們設置了一個包含我們提交的本地git倉庫。GIT結帳未追查問題
後同事推了一些更新,我取併合併到我的本地開發分支,我開始遇到了以下問題:
[email protected]:/var/www/Intranet/sites/intranet/modules/custom$ git checkout dev
error: The following untracked working tree files would be overwritten by checkout:
themes/bigcompany/panels/layouts/radix_bryant_flipped/radix-bryant-flipped.png
themes/bigcompany/panels/layouts/radix_bryant_flipped/radix-bryant-flipped.tpl.php
themes/bigcompany/panels/layouts/radix_bryant_flipped/radix_bryant_flipped.inc
Please move or remove them before you can switch branches.
Aborting
上述通常的問題showes,當我試圖簽入其他的枝條失敗了,我被困在當前的分支中。
參考this問題,有一個建議我的問題是關於gitignore文件。然而,我gitignore文件有什麼指示應被忽略,因爲下面顯示了我的主題目錄的任何部分:
# .gitignore for a standard Drupal 7 build based in the sites subdirectory.
# Drupal
files
settings.php
settings.*.php
# Sass.
.sass-cache
# Composer
vendor/
# Migrate sourec files
modules/custom/haringeygovuk_migrate/source_data
正如上面提到的,我試圖執行git的結帳到任何分支失敗與上面的消息。我決定強制使用-f開關,併成功切換到我的目標分支,但我失去了幾百行代碼 - 我很樂意避免前進。
我上我的同事們更喜歡在WAMP設置工作在Linux Ubuntu的VirtualBox的操作和使用GIT猛砸終端仿真器用於執行Git命令。 環境的差異是否會導致這些嚴重問題?
任何人都可以請解釋一下這個問題是什麼以及我如何解決它?
嗯,我不介意刪除「粗心大意」這個詞,可能對於母語人士來說這聽起來太強了(顯然,我不是)。也許「不小心」會更好 – user3159253