Languages
[Edit]
EN

Git - most useful commands for git repo origin management - set remote url / add remote repo / remove / check / https ssh

6 points
Created by:
daniell
280

Examples: 

# check 
$ git remote -v
> origin https://github.com/USERNAME/REPOSITORY.git (fetch)
> origin https://github.com/USERNAME/REPOSITORY.git (push)


# add
$ git remote add origin https://github.com/USERNAME/REPOSITORY.git


# set
$ git remote set-url origin https://github.com/USERNAME/REPOSITORY.git


# remove
$ git remote remove origin


# push
git push origin master

It also works for SSH

# check 
$ git remote -v
> origin git@github.com:USERNAME/REPOSITORY.git (fetch)
> origin git@github.com:USERNAME/REPOSITORY.git (push)


# add
$ git remote add origin git@github.com:USERNAME/REPOSITORY.git


# set
$ git remote set-url origin git@github.com:USERNAME/REPOSITORY.git


# remove
$ git remote remove origin

 

Useful links:

Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join