2014-05-26 09:38:18 -04:00
|
|
|
# How to push GitLab CE master branch to all remotes.
|
|
|
|
|
2014-06-11 04:37:48 -04:00
|
|
|
The source code of GitLab is available on multiple servers (with GitLab.com as the canonical source).
|
|
|
|
Synchronization between the repo's is done by the lead developer if there is no rush.
|
2014-05-26 09:40:44 -04:00
|
|
|
This happens a few times per workday on average.
|
2014-06-11 04:37:48 -04:00
|
|
|
If somebody else with access to all repo's wants to do it the instructions are below.
|
|
|
|
This is just to distribute changes, not to make them.
|
2014-05-26 09:38:18 -04:00
|
|
|
|
2014-05-26 09:54:06 -04:00
|
|
|
## Add this to `.bashrc` or [your dotfiles](https://github.com/dosire/dotfiles/commit/52803ce3ac60d57632164b7713ff0041e86fa26c)
|
2014-05-26 09:38:18 -04:00
|
|
|
|
|
|
|
```bash
|
|
|
|
gpa ()
|
|
|
|
{
|
2014-05-26 09:54:06 -04:00
|
|
|
git push origin ${1:-master} && git push gh ${1:-master} && git push gl ${1:-master}
|
2014-05-26 09:38:18 -04:00
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2014-05-26 09:40:44 -04:00
|
|
|
## Then add remotes to your local repo
|
2014-05-26 09:38:18 -04:00
|
|
|
|
|
|
|
```bash
|
2014-05-26 09:54:06 -04:00
|
|
|
cd my-gitlab-ce-repo
|
2014-05-26 09:38:18 -04:00
|
|
|
|
|
|
|
git remote add origin git@dev.gitlab.org:gitlab/gitlabhq.git
|
2014-05-26 09:54:06 -04:00
|
|
|
git remote add gh git@github.com:gitlabhq/gitlabhq.git
|
|
|
|
git remote add gl git@gitlab.com:gitlab-org/gitlab-ce.git
|
2014-05-26 09:38:18 -04:00
|
|
|
```
|
|
|
|
|
2014-05-26 09:40:44 -04:00
|
|
|
## Push to all remotes
|
2014-05-26 09:38:18 -04:00
|
|
|
|
|
|
|
```bash
|
2014-05-26 09:54:06 -04:00
|
|
|
gpa
|
2014-05-26 09:38:18 -04:00
|
|
|
```
|
|
|
|
|