I accidentally moved the .git folder out of my working directory before adding & changing some files. When I replaced the .git folder after making the changes, git didn't pick up the changes (I used git add .
, git commit -a
). I tried to reproduce the issue and failed. Is there a way to force git to scan for changes in a source tree, or some other way to fix this?
Instead of trying to "fit" the new git folder into the project, you should:
This IMHO is by far the best approach for this awkward case, which i found myself in a couple of times. However will not do if the difference between your repo and the central one it's to big, forcing you to make a megacommit which it's sometimes not desirable.
It's been a long time since you asked, hope this will bring some ligth to the issue.
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