GitHub Desktop: "This file is empty"
Solution 1
After discussion, if the change of the tex file is only in term of metadata (and not actual file content change, after a latex recompilation), the GitHub Desktop might be unable to display any change.
Since it detects no change even though the git status list this file, it falls back to a "this file is empty" message.
Solution 2
In addition to the @VonC response.
To dissmiss this alert
Git desktop
unselect all changed files
select only the "this file is empty" files
try to commit
Git will display a commit error, saying that you can't do that. After closing the modal, Git should delete the files from the changes list.
Comments
-
Franck Dernoncourt almost 2 years
The file
naaclhlt2016.tex
is not empty on the client or in the repository, however GitHub Desktop displays "This file is empty". What could explain this?The file
naaclhlt2016.tex
is present on GitHub repository:git status
:It creates conflict when I try to sync:
-
VonC over 8 yearsIs this a new file, not yet pushed?
-
Franck Dernoncourt over 8 years@VonC The file naaclhlt2016.tex is present on GitHub repository.
-
VonC over 8 yearsIs it present in a different path? Is there any case difference anywhere in the path or name?
-
Franck Dernoncourt over 8 years@VonC same path, same case.
-
VonC over 8 yearsWhat does a git status says, when using the command line?
-
Franck Dernoncourt over 8 years@VonC git status thinks naaclhlt2016.tex has changed. I added the screenshot in the question. It looks like naaclhlt2016.tex appears in the list of changed files each time I compile the latex document.
-
VonC over 8 yearsIf that document is generated, maybe it should not be versioned at all.
-
Franck Dernoncourt over 8 years@VonC True, but compiling it shouldn't change it. Looking at the "date modified", you are right though. I guess that explains it.
-
VonC over 8 yearsThat explains the modified status, but not "file is empty", unless GitHub Desktop is unable to display metadata changes, and consider it does not detect any file content change?
-
Franck Dernoncourt over 8 years@VonC I guess GitHub Desktop is unable to display metadata changes.
-
-
VonC over 8 yearsThat might be a bug or at least a surprising "feature" to report to GitHub support, and see if they think it is the expected response.
-
Franck Dernoncourt over 8 yearsI will report, but first I will try to understand why compiling a tex file with Texmaker changes the “date modified” meta-information. I will let you know when I submit the report.
-
VonC over 7 years@FranckDernoncourt Did you get any feedback from gitHub support about this feature?
-
Franck Dernoncourt over 7 yearsSorry, I forgot whether I had submitted a report. I have just submitted one. Thanks for the follow-up.
-
Franck Dernoncourt over 7 years"That may not be the intended behavior, but I am not sure. I have shared your feedback with our team for them to consider."
-
VonC over 7 years@FranckDernoncourt the suspense is killing me ;)
-
Varaquilex over 7 yearsAny news on this?
-
VonC over 7 years@Varaquilex not on my side. Maybe the OP has more.
-
Shai Petel about 6 yearsI'd say this is the "solution" to this strange issue. Indeed trying to commit only these files results in an error, the commit is not done and the problem is gone. Thanks!