Reputation: 16453
I already have a git repostory setup that is empty. I want to push my local changes to this remote repository but I can't figure out how to add the remote repository. If this was Azure there would be a wizard but it's not so you have to understand the little hidden items to click on to get where you need to go.
Anyway, I found that I can drill into Repository settings and I see a tiny link under remotes called add
, if I click it, it looks like I can add a repository but It's asking me a question I I'm not sure about. It wants to know fetch and push urls. Do I put the same url for both? I swear I've done this before in the past but I don't remember inputting the url in twice.
Upvotes: 3
Views: 7468
Reputation: 16453
Just paste the url within the Fetch, it will automatically also copy it to the below Push
input because the checkbox below is checked.
If you've already saved and committed changes locally and want to push them to the new repository then open command prompt from root of project folder and do the following:
git push -u <'Name' you used in picture above> master
You only have to run this command the first time so that the branch will track the remote brach. Afterwards you can use the Sync
Push
link within Visual Studio.
Upvotes: 2