2014-09-25 186 views
0

:)使用git pull時忽略目錄

我有一個產品* nix服務器,它使用「git pull」從github獲取更新的文件。

我的問題是,「app/code/community /」中有一些插件的過時版本,這些插件會被拉下來並覆蓋我的本地(最新)文件和文件夾。

我不知道如何告訴git忽略這個目錄,當我從github拉...當然,有人可以幫我嗎?

提前致謝!

克里斯

+0

提交您的更改... – 2014-09-25 11:06:53

回答

1

你可以做到以下幾點:老

  • git checkout --ours -- <filename>

    1. git pull它將取代您{了最新}文件來恢復您的文件到您的版本

    2. git add and commit

    希望這能解決您的問題!

    欲瞭解更多詳情請嘗試通過:Simple tool to 'accept theirs' or 'accept mine' on a whole file using git

    快樂Gitting!

  • +0

    非常感謝:) – chaensel 2014-09-25 11:33:08

    +0

    樂意幫忙! :) – 2014-09-25 11:35:21