I've created git repository, added code and pushed it to GitHub.
Then locally, I've edited the file Eila.Analyser/Program.cs
, that was added to GitHub in first commit, saved it and git status
says there's no changes.
Ok, I think, must have messed something up, git reset --hard HEAD
, and as I understand that should revert everything, but my file is not reverted.
So I think I'm doing something wrong. I edit file in root folder, git status
- shows there are changes, works as suspected, so it works on files in root folder, but not in sub folders.
Am I missing something obvious here?
UPDATE: Evidence, that file I'm editing was really commited (git log --stat
):
if it helps, tree picture:
UPDATE2: Ok, I thought I really messed something up, so I've deleted folder, where was my solution, cloned once again from gitHub, and my local code still differs from existing in gitHub and git status sees no changes, git log origin/master..HEAD
gives nothing.
Sometimes I have the same problem, especially when I have subfolder which is another git repo itself. The solution is: renaming the folders. Try switching the folder name to something else. Commit that, then rename it back. If the subfolder itself is another Git repo, and you want it to be totally detached from the mainstream, and follow your repo, you should remove the remote of that subfolder first.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With