Another common VCS in use today is Mercurial, which has a similar focus on distributed capabilities to Git, but with some differences. Thanks to a lot of similarities with Git, it's not too hard to convert an existing Mercurial repository to a Git repository and then upload it to GitLab:
- First, you'll need to clone the hg-fast-export tool:
git clone https://github.com/frej/fast-export.git
- Then, clone the repository you want to upload to GitLab:
hg clone [REPO URL] mercurial-repo
- Because Mercurial is more lax with the content it allows in the author field, you need to clean up the authors and create an author mapping file. First, run the following commands:
cd mercurial-repo hg log | grep user: | sort | uniq | sed 's/user: ...