Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git reconnect to a remote repository

Tags:

git

I made a huge mistake that resulted in my having a local version of my project that is no longer connected with the remote repository it was once associated with. Is there some trick to reestablishing that connection/association w/o blowing away the local version of the code?

like image 413
jaydel Avatar asked Feb 07 '12 15:02

jaydel


People also ask

How do I reinitiate git?

If you want to restart a git repo, nuke the . git directory and do git init add your files/directories and commit.


1 Answers

Did you try:

git remote add --track master origin [url-to-git-repo]
like image 147
Pulkit Goyal Avatar answered Sep 20 '22 12:09

Pulkit Goyal