How to Set and Reset Git remote
There are a number of times when we want to set multiple Git Remote or we want to remove the remote.To communicate with the outside world, git uses what are called remotes.These are the repo other than your local we can say on GitHub where your data will be copied.
- How to check the remotes which are available on current repository.
git remote -v

example :
origin git@github.com:sagerenu/Jenkins-maven.git (fetch)
origin git@github.com:sagerenu/Jenkins-maven.git (push)
2.In the above example origin is the git remote located on git@github.com:sagerenu/Jenkins-maven.git.So at the time of push we don’t need to mention the URL we can Simply mention origin.So we can also say that like its an Alias so that we don’t have to mention the URL again and again.

And if only one remote is present for the current repo we can simply use:
git push
3.Setting the Remote.Go to the git repo directory and run the below command with replacing the URL with your GitHub Repo.
git remote add origin https://github.com/sagerenu/Jenkins-maven.git

4.Now lets say you want to change the remote for your repo and set it to another repository so either you can create a new remote or remove the remote origin and create a new one.So for removing the Remote :-
git remote rm origin
5.And then set the new remote simply with the step 3.
