3 ms·
I've recently moved to pushing all my open source code to both GitLab and GitHub, but using GitLab for actual issue tracking, continuous integration, build test
by dak1 10y ago
I've recently moved to pushing all my open source code to both GitLab and GitHub, but using GitLab for actual issue tracking, continuous integration, build tests, etc. I've found GitLab's integrated toolset to be superior to what GitHub currently offers, and in truth there isn't really anything I feel like I've been missing (some tools like Code Climate are only free for GitHub accounts, but it's easily resolved by just using both).
Plus the GitLab team has just been killing it with each release, and it just feels good to use open source (and be able to open issues, vote on improvements, track changes for the upcoming release...). Free private repos is just icing.
Setting up a project for both just takes a few initial commands to configure git:
git remote set-url --add --push origin git@github.com:account/repo.git
git remote set-url --add --push origin git@gitlab.com:account/repo.git
Then pushing to origin will always push to both. I also add a github and gitlab remote in case I only want to push to one as well.
- tedmiston 10y ago> some tools like Code Climate are only free for GitHub accounts, but it's easily resolved by just using both Are you doing a read only mirror to GitHub for this?
- dak1 10y agoEffectively. My project still gets pushed to GitHub and lives there, but I've disabled every feature I could (you can't disable PRs, but it's easy enough to redirect PRs over to GitLab). Code Climate can still happily read from the GitHub project and I can add the badge to the README if desired, which is visible on both GitLab and GitHub. And since origin pushes to both, they are rarely if ever out of sync. And by using GitLab I get GitLab CI instead of Travis (which is quite nice), GitLab's amazing Issue tracker and board, which blows GitHub away, more fine grained control over merging (no more forced --no-ff merges if you don't want), Issue and MR templates, an activity stream, far more control over your project's settings... really I can't say enough good things about my experience with GitLab over the last ~6 months.
- DouweM 10y agoGitLab can actually keep your GitLab and GitHub repos in sync automatically! Check out the "Mirror Repository > Push to a remote repository" option in your project's settings.
- jtrtoo 10y agoOh, good tip! Up until this moment I thought a remote mnemonic (e.g. "origin") could only refer to one. I didn't realize you could stack several behind a mnemonic.