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,955
  • 41
  • 119
  • 229
  • 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
  • 29,961
  • 12
  • 103
  • 150
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
  • 52,634
  • 3
  • 45
  • 54