Adding a remote to your project
Create a new gitlab
project on your personal gitlab site
and follow the gitlab instructions.
Note: make sure that the remote starts with
git@ and not
https if you want to use a ssh key.
You can see the https and ssh url when clicking on the
- In order to verify that your remote was successfully added to your local project you can type:
git remote -v
on your terminal (when you are somewhere inside you git project folder).
-uoption when doing the initial push in the gitlab instructions sets the upstream. This means that you do not always need to type
git push <remote_name> <branch>but that it is enough to type
In other words you set a default remote and branch.