This post is about switching to new repository at the same github account. earlier i had public repository then i wanted to commit to private repository. thats when i got the following error:
fatal: remote origin already exists
to resolve the above error I did the following:
git remote set-url --add origin https://github.com/username/newrepository.git
git init
git add .
git commit -a -m "Initial commit"
git pull origin master
git push -f origin master ( to push forcefully)
Enter the credentials when prompted for user name and password.
https://stackoverflow.com/questions/10904339/github-fatal-remote-origin-already-exists
No comments:
Post a Comment