![adding a file to a git repository on github desktop for mac adding a file to a git repository on github desktop for mac](https://i0.wp.com/wpism.com/wp-content/uploads/New-Github-Repository-details.png)
See "git help submodule" for more information. Hint: If you added this path by mistake, you can remove it from the index with Hint: If you meant to add a submodule, use: Warning: adding embedded git repository: vscode-java the embedded repository and will not know how to obtain it. Running git add -all gave me the yellow notes: Nothing added to commit but untracked files present (use "git add" to track) I had cloned a repo, but I had a parent folder above this repo which I had opened instead, and then I tried adding a file of the subfolder's repo with git add 'd:\Stack Overflow\vscode_git\vscode-java\.github\ISSUE_TEMPLATE.md', which simply did nothing, no warning message, and the git status afterwards said: The Parent folder that I had opened mistakenly on parent level (vscode_git in my case): Strange enough, I did not get the idea from that answer, instead, the idea came up when I tested git add -all, see the long story below. I was not in a subfolder as reported, but the other way round, in a parent folder. I am still a beginner at git, and it was just a stupid mistake I made, long story in one sentence. Rename the folder back to what you want.Renaming the folder to something like setup-temp.git commit -m 'remove files' for each file git checkout your-branch your-file for each file mv UPPERCASENAME lowercasename git add. So make sure you have not changed the case of the containing folder on a Windows machine, if you have then I'd suggest: A workaround if you want to change the case: remove all the files which case you want to change git add. I suspect that if I cloned the project on a *nix machine I would have seen two folders, Setup and setup. The result was that I couldn't see all of the files in the setup in GitHub.
![adding a file to a git repository on github desktop for mac adding a file to a git repository on github desktop for mac](https://susudev.com/wp-content/uploads/2020/10/create-a-bare-repository.jpg)
From that point on when I added new files to the setup folder they were stored in the setup folder and not the Setup folder, but I guess because I was developing on a Windows machine the existing Setup folder in git/github was not changed to setup. I had a similar problem where a folder called Setup controlled by Git and hosted on GitHub, all development was done on a Windows machine.Īt some point I changed the folder to setup (lower case S). Make sure you have not changed the case of the folder name in Windows: To add to the possible solutions for other users:
![adding a file to a git repository on github desktop for mac adding a file to a git repository on github desktop for mac](https://tutorial.eyehunts.com/wp-content/uploads/2018/05/intial-commit-android-studio--732x429.png)
gitkeep as a placeholder so git will track the folder. Standard solution is to place a blank file named. Ensure you're not trying to add an empty folder.Ensure the file doesn't meet your exclude rules in.Ensure there are actually saved changes on the file in question.Since I came to this first, I hope to save others some time.įrom the above answers and what I've seen elsewhere, the usual fixes to this problem are: "working directory clean" and has nothing to commit.īut I had a different solution than what's here. ", and then "git status" and it keeps saying I found myself in a similar situation as the poster: