How To Add A New Remote To Your Git Repo - Assembla Help Center

Skip to main contentAll CollectionsUsing GitGetting StartedHow to Add a New Remote to your Git RepoHow to Add a New Remote to your Git RepoErika Kuntar avatarWritten by Erika Kuntar Updated over 12 months ago

A Git remote is a shared repository that allows you to commit remotely rather than to your local repository. To add a new remote, use the git remote add command on the terminal, in the directory where your repository is stored.

The git remote add command takes two arguments:

  • a unique remote name, such as, “my_awesome_new_remote_repo”

  • a remote URL, which you can find on the Source sub-tab of your Git repository in Assembla, as shown in the following image:​

The following example shows this code in use:

#set a new remotegit remote add my_awesome_new_remote_repo [email protected]:portfolio/space.space_name.git#Verify new remotegit remote -v> my_awesome_new_remote_repo  [email protected]:portfolio/space.space_name.git (fetch)> my_awesome_new_remote_repo  [email protected]:portfolio/space.space_name.git (push)

To push your changes into your remote repo, execute the git push <remote> <branch> command, similar to the following example:

git push <your_remote_name>#git push my_awesome_new_remote_repo

​If you have any questions or need our assistance, don't hesitate to contact us at [email protected]

Did this answer your question?😞😐😃

Tag » Add Branch Git Remote