I am getting a weird issue with Git repository not being clean, this is right after cloning it. I tried several different workarounds and no luck.
Note that I don't think I can't just copy all the file to another directory and copy back with a new git repo because we want to keep the git commit history.
- Tried to
git add .
from root directory and recommit but the files won't add. - There's not
.gitignore
file in the root directory of the repo...I also checked/Users/user
directory also and there's no extra.gitignore
file - Checked within the directory where files are not committing for extra
.git
directory but there was none - Tried
git checkout -- <file>
and reset file but does not work - Tried
git add --force
and it does not work
Was wondering if anyone else had any ideas?
Update 1
Few things I have noticed
- The committed file on GitHub have 257 lines, but after I do a fresh pull it locally, the local version only have 89 lines.
- If I do
git rm --cached
to remove the file, I am able to delete the unstaged files and commit those, but I loses the change difference of those files.