7

I encountered an error when I commit an image, the process is already open in an other program (like ADOBE Photoshop) and I can't commit and the images are removed.

enter image description here

how can I fix it? Thank for your help.

Loic
  • 101
  • 1
  • 3
  • What exactly did you do? You committed the image and then tried to `pull`? Which pull operation did you try (fast forward if possible, fast forward only, rebase)? Do you have other unstaged changes? What other processes are running? Did you try to close all other running programs? – kowsky Mar 05 '18 at 08:12
  • I did a commit when images are already open in photoshop. It's works when photoshop is closed, but why can I commit my code without problem even if the program is open but not images ? – Loic Mar 05 '18 at 09:27
  • When you commit, you add things to your repository. This is no problem. Now you pull - i.e. you include remote changes into your repository. If there are changes locally as well as on your remote, some kind of merge is performed. This seems to try to delete the `/images` folder (I suppose because it does not exist in the remote repository). This deletion is what fails, because the images are still open in photoshop. – kowsky Mar 05 '18 at 10:21

2 Answers2

3

You have to stop any process that is inside that folder, if you are using Visual Studio code make sure to disable git, which is enabled by default, or just close Visual studio code, it could be an open terminal as well

"git.enabled": false
Radosvet Petrov
  • 748
  • 6
  • 9
2

A fix that worked for me was using WSL (I'm sure git terminal will work too). Then run git checkout <branch> then git pull

Ryan w
  • 528
  • 1
  • 7
  • 21