Working on a repository, I had to fetch. I add the modified files, create a commit, then pulled, to obtain an error. One file wasn't added and committed, even if I added it : it was still displayed with a git status as modified.
Here all the commands I tried. Nothing worked :
- git add file
- git rm file
- git checkout file
- git stash
- cd ../ && rm -rf repository && git clone repository
- brew uninstall git && brew install git
I also try every solution posted here : git status shows modifications, git checkout -- <file> doesn't remove them still no changes (even if I may have miss understood how we implement gitattributes).
When exploring the repository (cd and ls), the file doesn't appear in the folder where it is supposed to be, so it doesn't exist. The file is generated from middle man (slate documentation). We add them because we only use middle man on dev, so we have to push them on git to have them on prod. The file exists on the git platform we use. I tried to copy it in the repository. Still no changes.
I want to be able to fetch and merge. Having this file always visible in the git status make the message "Please commit your changes or stash them before you merge."appear each time and abort the process.
Here are the main tools we use
- ruby version : 2.3.1
- IDE : atom
- Git version : 2.10.2
- The two other people who work on this project use linux Mint.
Thank you !