Hello! Guys, someone can tell how to implement the following case: in the local repository, I added the wp-content/plugins directory to the .gitignore file and then execute git rm wp-content/plugins --cached (in order to clear the files that were already in the index, without their physical removal). I make a push, pull up changes in another project. During the pool, all files from the git rm wp-content/plugin are deleted (which I do not need, it is necessary that the files remain). Can someone tell me how to make a pool without deleting files? Perhaps there is a special flag?

  • “During the pool, all files are deleted from ...” is it in the second working copy, or in the one where did git rm ? - German Borisov
  • @HermanBorisov, in the second - Vladislav
  • git submodules ? - Total Pusher

1 answer 1

As far as I know, at the moment "beautiful" is not done. It is necessary in each working copy (except for the one where git rm executed) to manually backup the files to be deleted (for example, simply by copying to a temporary directory), then perform git pull , and then restore the files manually.