I accidentally manage to download a repo to a new machine by hitting the "download zip" instead of doing a clone.
I notice after I did a lot of changes, and now I have problems commit and push the new changes to github, since the git repo wasn't included in the zip.
What can I do?
Thanks
You can clone the repo, but you don't have to "copy your files over the new repo"
git clone http://github.com/<user>/<repo>
cd <repo>
With the git --work-tree
option, you can work in your git repo while considering another folder as your working tree:
git --work-tree=/path/to/unzipped/files add .
git status
git commit -m "commit changes from unzipped folder"
You can do a (shallow) clone into a separate directory and copy your changes over there.
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