Repository navigation
Description
Describe the bug
GitHub Desktop reports changes on files that are not changed. When trying to commit, it fails because there was no changes.
I can discard the changes, but they will re-appear the next time I run a git command. VSCode does not report the file as changed, neither does git status in terminal. The "files" that this happen to are symlinks.
Version & OS
Desktop version: Version 2.5.5. Windows 10 Pro 1909 (OS Build 18363.1016).
Steps to reproduce the behavior
First make sure symlinks are enabled in git and windows (developer mode)
It should then look somthing like this after clone:

This works for me to reproduce:
- Clone test repo with command:
git clone -c core.symlinks=true https://github.com/andersHj/SymlinkTest.git - Add it to GitHub Desktop
-> GitHub Desktop reports one file has changed, but the file has no changes. - Discard the changes
- Type for instance
git statusin terminal
-> Changes re-appear - Try to commit changes
-> Fails with error that there are no changes
Expected behavior
Expected no changes to occur.
Actual behavior
The symlink file appears in the changes tab, but it says it has no changes in the changes preview. And trying to commit fails with no changes error.
Screenshots
Logs
Additional context
Result of git config -l --show-origin from repo root
file:C:/Program Files/Git/etc/gitconfig diff.astextplain.textconv=astextplain
file:C:/Program Files/Git/etc/gitconfig filter.lfs.clean=git-lfs clean -- %f
file:C:/Program Files/Git/etc/gitconfig filter.lfs.smudge=git-lfs smudge -- %f
file:C:/Program Files/Git/etc/gitconfig filter.lfs.process=git-lfs filter-process
file:C:/Program Files/Git/etc/gitconfig filter.lfs.required=true
file:C:/Program Files/Git/etc/gitconfig http.sslbackend=openssl
file:C:/Program Files/Git/etc/gitconfig http.sslcainfo=C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
file:C:/Program Files/Git/etc/gitconfig core.autocrlf=input
file:C:/Program Files/Git/etc/gitconfig core.fscache=true
file:C:/Program Files/Git/etc/gitconfig core.symlinks=true
file:C:/Program Files/Git/etc/gitconfig pull.rebase=false
file:C:/Program Files/Git/etc/gitconfig credential.helper=manager
file:C:/Users/Anders/.gitconfig user.name=Anders Hjellvik
file:C:/Users/Anders/.gitconfig user.email=......
file:C:/Users/Anders/.gitconfig core.editor='C:/Program Files/Sublime Text 3/sublime_text.exe' -n -w
file:C:/Users/Anders/.gitconfig filter.lfs.process=git-lfs filter-process
file:C:/Users/Anders/.gitconfig filter.lfs.required=true
file:C:/Users/Anders/.gitconfig filter.lfs.clean=git-lfs clean -- %f
file:C:/Users/Anders/.gitconfig filter.lfs.smudge=git-lfs smudge -- %f
file:C:/Users/Anders/.gitconfig push.default=current
file:.git/config core.repositoryformatversion=0
file:.git/config core.filemode=false
file:.git/config core.bare=false
file:.git/config core.logallrefupdates=true
file:.git/config core.ignorecase=true
file:.git/config core.symlinks=true
file:.git/config remote.origin.url=https://github.com/andersHj/SymlinkTest.git
file:.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:.git/config branch.master.remote=origin
file:.git/config branch.master.merge=refs/heads/master


Activity
niik commentedon Sep 10, 2020
Hey @andersHj, thanks for opening this. I believe this is due to the version of Git that we currently ship with GitHub Desktop. See https://github.com/git-for-windows/build-extra/blob/master/ReleaseNotes.md#changes-since-git-for-windows-v2262-april-20th-2020
Note that the workaround seems to require the embedded version of Git so you'd have to execute (for the current version of Desktop)
We typically lag a few versions behind Git in order to ensure we're on a stable version. Once Git 2.29 is released we can start looking at upgrading to 2.28.
I'm sorry I don't have a better answer for you but I hope the workaround unblocks you until we're able to upgrade.
I'm going to label this as priority 3 for now given that symlinks on Windows isn't a commonly used feature.
andersHj commentedon Sep 10, 2020
Hi, thanks for fast reply!
The workaround did not work for me with git version 2.28.0 installed.
When running the
~/AppData/Local/GitHubDesktop/app-2.5.5/resources/app/git/mingw64/bin/git.exe add -ucommand the changes went away, but they re-appeared like before when typinggit statusin terminal.So I downgraded my git version and tried again with
git add -uand that worked fine 👍fabiopedrosa commentedon Oct 2, 2020
Workaround worked fine for me.
fabiopedrosa commentedon Oct 8, 2020
It actually doesn't after all. Ends up happening over and over.
fabiopedrosa commentedon Nov 13, 2020
@niik can someone look into this? still a major hassle.
saschanaz commentedon Dec 29, 2020
My workaround is to replace the embedded git executable with the version 2.28 one.
morigs commentedon Oct 15, 2021
I have very similar issue with symlinks in WSL filesystem