TL;DR summary
Weird files appeared. They show on git but not on disk. A list of possible programs causing that are listed.
- Why did they appear?
- How can I get rid of them now?
There is a weird \200
character I cannot type.
For the record: the solution that worked for me is the second answer of user VonC
: https://stackoverflow.com/a/13250936/1255826
I already had to copy all the files and make a new Git repository, removing the .git
folder from my project to try and fix this. git status
claims there are modified files/folders with a very strange \200
character in their name, when actually I didn't add those.
To clarify, I cannot see any file with those names on my disk. I can only assume there is something weird going on in the .git
folder. I've tried to see if there are any hidden files with that \200
part in their name. There aren't. (I even have the "show hidden files and folders" option enabled on my computer):
bad5e7f1e@DESKTOP-3KR49G0 ~/repos/algoritmi2016/laboratorio/lab5/es3/src
$ ls
es3.c student
bad5e7f1e@DESKTOP-3KR49G0 ~/repos/algoritmi2016/laboratorio/lab5/es3/src
$ ls -ahf
. .. es3.c student
bad5e7f1e@DESKTOP-3KR49G0 ~/repos/algoritmi2016/laboratorio/lab5/es3/src
$
See my terminal log here to see exactly what I mean.
Note that git status
didn't show these files, that were added a second later when I used the git add -A
command. Then, after that, these "ghost" files are shown:
bad5e7f1e@DESKTOP-3KR49G0 ~/repos/algoritmi2016
$ git status
Sul branch master
Your branch is up-to-date with 'origin/master'.
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: laboratorio/lab5/es3/Makefile
modified: laboratorio/lab5/es3/src/es3.c
modified: laboratorio/lab5/es3/src/student/student.c
modified: laboratorio/lab5/es3/src/student/student.h
Untracked files:
(use "git add <file>..." to include in what will be committed)
laboratorio/lab5/es3/.gitignore
no changes added to commit (use "git add" and/or "git commit -a")
bad5e7f1e@DESKTOP-3KR49G0 ~/repos/algoritmi2016
$ git add -A
bad5e7f1e@DESKTOP-3KR49G0 ~/repos/algoritmi2016
$ git status
Sul branch master
Your branch is up-to-date with 'origin/master'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: laboratorio/lab5/es3/.gitignore
modified: laboratorio/lab5/es3/Makefile
modified: laboratorio/lab5/es3/src/es3.c
new file: "laboratorio/lab5/es3/src\200student/student.c"
new file: "laboratorio/lab5/es3/src\200student/student.h"
Changes not staged for commit:
(use "git add/rm <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: laboratorio/lab5/es3/src/student/student.c
modified: laboratorio/lab5/es3/src/student/student.h
deleted: "laboratorio/lab5/es3/src\200student/student.c"
deleted: "laboratorio/lab5/es3/src\200student/student.h"
bad5e7f1e@DESKTOP-3KR49G0 ~/repos/algoritmi2016
$
I've already tried in the past to ignore this, and push the changes to github anyway, but then the same files/folders are shown in github, although when I click them I get an error page (404 or 500, I don't remember the error code).
Also, if I try to delete these with a del or rm command, it says the file doesn't exist. I don't even know if I can type the character that stands for the \200
escape code.
I might have to try and type that character when I use git rm <PATH/TO/FILE>
instead of just trying to do del or rm, that do not work.
Why are these files/folder being created? Is it just a bug?
I'm working with a combination of these tools and programs: cygwin64, mingw64, gcc, make, splint, netbeans, atom (editor), git on Windows 10 x64. Is any of these the cause of the error?
My project folder is under C:\\Users\%USERNAME%\repos\algoritmi2016
.
splint and git are installed both with and without cygwin. mingw64 is installed normally on Windows' cmd. gcc and make are installed under cygwin. Most of the time I am just using cygwin which points correctly to the cygwin version of splint, git, gcc and make.
I'm not using the atom shell commands, just the GUI editor.
I used Netbeans and atom only inside the ./laboratorio/lab5/es3
folder of my project. In that folder I have the Netbeans project files .project
and nbproject.
On cygwin I have a symbolic link in my cygwin's home folder called repos pointing to my normal Window's %USERNAME%\repos
folder. I use this link to navigate with cd quickly to my repos folder.
I tried to remove src\200student/
(is it even a folder?), using git git rm -rf ./*student --cached
: it didn't match any file, unfortunately.
Is there something wrong in my setup causing this problem?