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 remote
git remote add my_awesome_new_remote_repo git@git.assembla.com:portfolio/space.space_name.git
#Verify new remote
git remote -v
> my_awesome_new_remote_repo git@git.assembla.com:portfolio/space.space_name.git (fetch)
> my_awesome_new_remote_repo git@git.assembla.com: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 support@assembla.com.