0

I'm using WordPress Sage so for every project I clone their repo. For my current project I want to push to a repo of mine though. Should I delete all Git files and start over, or can I keep them and somehow inform Git about my repo?

drake035
  • 3,869
  • 33
  • 97
  • 193
  • 1
    Voting to close as a duplicate of http://stackoverflow.com/questions/2432764/change-the-uri-url-for-a-remote-git-repository – bahrep Aug 01 '16 at 14:50

2 Answers2

1

You should change the remote repo. See Git Basics | Working with Remotes.

git remote add origin /path-or-URL/to-repo

bahrep
  • 27,991
  • 12
  • 99
  • 140
1

Just add a new remote.

git remote add myrepo myuser@myserver
git push myrepo mybranch

If you want mybranch to always push to myrepo, change the tracking information:

git push -u myrepo mybranch
blue112
  • 46,589
  • 3
  • 43
  • 54