Short: If you have linked more than one remote repository to your local files, is there a way to push to both of them?
Long: Due to work reasons, I have to use gitlab and github remotes for my code. So as soon as I make some local changes I would like to update both repositories.
My .git/config file looks like this
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
precomposeunicode = true
[remote "origin"]
url = https://github.com/myusername/myproject.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
[remote "gitlab"]
url = https://gitlab.com/myusername/myproject.git
fetch = +refs/heads/*:refs/remotes/gitlab/*
As far as I understand the git status
command works only with the origin remote, is this true?
Push and pull does work with my origin remote as well, unfortunately, I cannot add stuff to my other remote (gitlab) with git add somefile.txt gitlab
How do i push stuff to my gitlab remote?