chaensel
chaensel

Reputation: 183

Ignoring directories when using git pull

:)

I have a production *nix server that gets the updated files from github using "git pull".

My problem is that there are outdated versions of some plugins in "app/code/community/", which would be pulled and would overwrite my local (up-to-date) files and folders.

I do not know how to tell git to just ignore this directory when I pull from github... Can anybody help me out here?

Thanks in advance!

Chris

Upvotes: 0

Views: 1123

Answers (1)

Mudassir Razvi
Mudassir Razvi

Reputation: 1833

You can do the following:

  1. git pull it will replace you {up-to-date} files with old

  2. git checkout --ours -- <filename> to revert you files to your version

  3. git add and commit

Hope this solves your problem!

For more details try going through: Simple tool to 'accept theirs' or 'accept mine' on a whole file using git

Happy Gitting!

Upvotes: 1

Related Questions