... | ... | @@ -24,7 +24,7 @@ GHC uses Git for revision control (version 1.7.8 or newer recommended). |
|
|
A complete GHC source tree can be obtained (located in `ghc`) by running the following command:
|
|
|
|
|
|
```
|
|
|
git clone --recursive git://git.haskell.org/ghc.git
|
|
|
git clone --recursive https://gitlab.haskell.org/ghc/ghc
|
|
|
```
|
|
|
|
|
|
**PLEASE READ THIS:** There are some specific Git workflows which will make GHC development a lot more pleasant; read [how to use git with GHC](working-conventions/git) and [how to contribute a patch to GHC](working-conventions/fixing-bugs) for suggestions about this.
|
... | ... | @@ -38,6 +38,29 @@ Notes: |
|
|
|
|
|
- The above directions are valid for cloning GHC 7.9 or newer. For cloning GHC 7.8 or earlier, see the [legacy](building/getting-the-sources/legacy) instructions.
|
|
|
|
|
|
### Using a Fork of GHC
|
|
|
|
|
|
|
|
|
You can create a fork of ghc by logging in and clicking the fork button at [ https://gitlab.haskell.org/ghc/ghc](https://gitlab.haskell.org/ghc/ghc). Do NOT clone your fork directly. This will cause issues with relative submodule paths. Instead:
|
|
|
|
|
|
- Clone the official GHC repo as described [above](building/getting-the-sources#cloning-head).
|
|
|
- Add your fork as a new remote with the following command. "myFork" can be any name you choose. The exact url is given on your fork's gitlab page.
|
|
|
|
|
|
```
|
|
|
git remote add myFork git@gitlab.haskell.org:JohnDoe/ghc.git
|
|
|
```
|
|
|
|
|
|
|
|
|
You can then e.g. fetch and checkout a branch from your fork:
|
|
|
|
|
|
```
|
|
|
git fetch myFork
|
|
|
git checkout myFork/myBranch
|
|
|
```
|
|
|
|
|
|
|
|
|
If you really must clone your fork directly, you can use the python script .gitlab-ci/fix-submodules.py which tweaks the git submodule paths to point to gitlab.haskell.org/ghc/ghc.
|
|
|
|
|
|
### Getting a branch
|
|
|
|
|
|
|
... | ... | @@ -50,7 +73,7 @@ To get a branch, you need to get from a repo that contains the branch; in partic |
|
|
You can clone a specific branch via:
|
|
|
|
|
|
```
|
|
|
git clone -b <branchname> --recursive git://git.haskell.org/ghc.git ghc-<branchname>
|
|
|
git clone -b <branchname> --recursive https://gitlab.haskell.org/ghc/ghc ghc-<branchname>
|
|
|
```
|
|
|
|
|
|
|
... | ... | @@ -69,7 +92,7 @@ git submodule update --init |
|
|
Starting with GHC 7.10.1, you can simply clone a specific tag via:
|
|
|
|
|
|
```
|
|
|
git clone -b ghc-7.10.1-release --recursive git://git.haskell.org/ghc.git ghc-7.10.1
|
|
|
git clone -b ghc-7.10.1-release --recursive https://gitlab.haskell.org/ghc/ghc ghc-7.10.1
|
|
|
```
|
|
|
|
|
|
|
... | ... | |