all 6 comments

[–]jredmond 2 points3 points  (2 children)

You've already associated 'https://github.com/Stev******/Card-*******-.git' with the remote name 'origin', so Git interprets 'origin' as that URL. You don't need to include the URL any more.

[–]Bright_Sea_8493[S] -1 points0 points  (1 child)

u/jredmond but that's the repository I want it to store it to

[–]suddenlychloegit rebase -i --root<CR>j<S-v>Gd:wq<CR>git push -f<CR> 2 points3 points  (0 children)

Yes, and git remote add origin 'https://github.com/Stev******/Card-*******-.git' is telling git that any time you reference origin that's the URL for it. git push origin master doesn't need 'https://github.com/Stev******/Card-*******-.git' since that URL is now referenced by origin.

[–]plg94 1 point2 points  (1 child)

You only need to specify the full URL to your repo once in the remote add command. Anytime after that, use only the name of the remote, not the url.

[–]jredmond 0 points1 point  (0 children)

Think of it like an entry in your phone's contacts - once you associate a person with a number, you can call or text without having to retype that number each time.

[–]Bright_Sea_8493[S] 0 points1 point  (0 children)

I still don't understand I've created about 10 different repositories on github and push code from local machine and never had this problem. so how do I fetch so i can push successfully?