2

I have a project directory that has been version controlled with git and pushed to Github. It is also backed up to OneDrive. My computer died and I downloaded my project from OneDrive and kept working on it, but did not initialize a git repository. Now I want to reconnect the local project directory to the remote repository without overwriting my local changes. i.e., I want to initialize a local repository, commit my new changes, and have my local changes take precedent over the Github versions, but I want to keep the version history from before my computer died.

What's the best way to do that?

Thank you!

Andrew
  • 490
  • 3
  • 9

1 Answers1

-1
  • Clone your repository into a new directory
  • Copy/Paste your WorkInProgress directory into the cloned directory
  • Git will detect the difference, and show you your changes
Khalil Khalaf
  • 9,259
  • 11
  • 62
  • 104