A Senior Developer working mostly with PHP and JavaScript, with a bit of Python thrown in for good measure, all on Linux. My tooling is simple, it's GitLab and JetBrains where possible.
Whenever I've needed to use different remotes, I've set them up to be completely different remote names. For instance if I had the origin on GitLab as git@gitlab.com:garybell/myproject.git, but also wanted to host it on GitHub, I'd run the following: git remote add github git@github.com:garybell/myproject.git
Following any commit messages, I can then run: git push origin branch && git push github branch, and the changes are pushed to both.
That’s a good option as well. If I remember correctly ‘origin’ is just a branch like any other. It is the main branch by convention and there is nothing special about it.
A Senior Developer working mostly with PHP and JavaScript, with a bit of Python thrown in for good measure, all on Linux. My tooling is simple, it's GitLab and JetBrains where possible.
Origin is just the name of the remote, yes. Much like master is the branch. I've just found that naming them to they are useful when using more than just "origin" helps
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Whenever I've needed to use different remotes, I've set them up to be completely different remote names. For instance if I had the
originon GitLab as git@gitlab.com:garybell/myproject.git, but also wanted to host it on GitHub, I'd run the following:git remote add github git@github.com:garybell/myproject.gitFollowing any commit messages, I can then run:
git push origin branch && git push github branch, and the changes are pushed to both.That’s a good option as well. If I remember correctly ‘origin’ is just a branch like any other. It is the main branch by convention and there is nothing special about it.
Origin is just the name of the remote, yes. Much like master is the branch. I've just found that naming them to they are useful when using more than just "origin" helps