0

I would like to link my current git repo to an updated version of the repo on my computer that wasn't being tracked.

However, if I clone it... it will download the old repo on top of it.

Is there a way where I can clone without downloading the files, then scan for real differences between the folder and the repo, and push those changes?

Rick
  • 421
  • 3
  • 15

2 Answers2

0

You can just add the old Github repo as an origin to your new repo with:

git remote add origin <repo-url>

Then you can do:

git fetch origin

And to compare your current changes (assuming they're in master branch) to the Github repo's files:

git diff master origin/master
ruohola
  • 21,987
  • 6
  • 62
  • 97
0

You can add a remote to a branch. It is described in detail here under "Adding Remote Repositories":

git remote add my_new_remote https://github.com/paulboone/ticgit
Kaligule
  • 630
  • 3
  • 15