I created a new repo:
git init
echo "# MESSAGE" >> README.md
git add README.md
git commit -m "first commit"
What I want here is, I want to push the commit to the empty repo. So I have to set a remote. I want to know what the difference is between these two commands:
git remote add origin git@github.com:User/UserRepo.git
git remote set-url origin git@github.com:User/UserRepo.git
I also what to know, what happens if I execute git remote set-url origin just after git init? What is the use of using the above commands if there is already an origin?