Hello i have a little project that i manage with git and gitlab.
I now ran into a weird problem that git recognise a changed file two times in the current directory but sees a change in another folder which weirdly points to the same location. Its hard to explain so i show:
Sebastian-Scholzs-MacBook-Pro:Anleitung Sebastian$ pwd
/Users/Sebastian/Projekte/Arbeit/Spreeakademie/test/hochbeete/Bankbeet/Pläne/Anleitung
Sebastian-Scholzs-MacBook-Pro:Anleitung Sebastian$ ls -l
total 3672
-rw-r--r-- 1 Sebastian staff 1334587 18 Feb 20:46 Anleitung.pdf
-rw-r--r-- 1 Sebastian staff 2811 18 Feb 20:53 Bauanleitung.md
-rw-r--r-- 1 Sebastian staff 487104 18 Feb 20:46 Bauanleitung.pdf
-rw-r--r-- 1 Sebastian staff 50168 18 Feb 20:46 Bauanleitung.sla
drwxr-xr-x 299 Sebastian staff 9568 18 Feb 20:46 Bilder
drwxr-xr-x 10 Sebastian staff 320 18 Feb 20:46 Videos
Sebastian-Scholzs-MacBook-Pro:Anleitung Sebastian$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
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: Bauanleitung.md
modified: ../../Pläne/Anleitung/Bauanleitung.md
no changes added to commit (use "git add" and/or "git commit -a")
You already see here that the file Bauanleitung.md
is mentioned as modified two times. Both paths point to the same file on the disk...
Sebastian-Scholzs-MacBook-Pro:Anleitung Sebastian$ git add Bauanleitung.md
Sebastian-Scholzs-MacBook-Pro:Anleitung Sebastian$ git status
On branch master
Your branch is ahead of 'origin/master' by 1 commit.
(use "git push" to publish your local commits)
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
modified: Bauanleitung.md
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: ../../Pläne/Anleitung/Bauanleitung.md
Staging the first file will not stage the second which in fact is the same file. What could be the root of the issue? Can i repair it or... should i burn it with fire?
i also noticed after pushing to my gitlab remote, that there are now two folders.Pläne/Anleitung/ contains the Bauanleitung.md
while
Also in the commit it showes that the two files also have the same index