0

I am not even sure I am asking the question properly. Basically, we have a project on GitHub. I downloaded the zip called BlahDevelopment, which has API(serverside C#), Web(clientside code), and some other folders. I modified the files heavily (about two full days of work). Then I realized I should have cloned the files for them to be "in version control." I CANNOT just delete the folders and clone them, because I did a lot of work and npm install doesn't work properly, so I did a lot of manual npm installs.

Is there a way to salvage this?

VSO
  • 11,546
  • 25
  • 99
  • 187
  • Heh, looks like I am f***ed: http://stackoverflow.com/questions/15681643/how-to-clone-git-repository-from-its-zip "In practice it seems that the "zip" downloads from github do not containt the .git directory, so this doesn't help :-(" Good times. – VSO Jun 07 '15 at 04:43

1 Answers1

0

Your best bet is likely something like this:

  1. Clone the repository to another directory, e.g. BlahDevelopment-clone
  2. Copy your modified files into the cloned directory, overwriting what's there
  3. Run git status to see what's been changed and then commit those changes

Note that you will run into trouble if any of the files in the cloned copy have been modified since your download of the Zip file. It's probably worth reviewing the commit log so you know what has been changed.

You might want to consider committing your code more frequently, as well. Two full days' worth of work is a lot of code to put into a single commit, and if you were making more granular commits you'd have figured out your Zip / Git problem much sooner.

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
  • Thanks Chris. I ended up making a back up, deleting everything, and then cloning and copying over the changes. And I completely agree on committing at least daily or multiple times a day. This was an exception and I got carried away. – VSO Jun 07 '15 at 17:34