Use Git to download, modify et merge the 4ME source code
Fork 4ME repo
Log in on https://gitlab.asap.dsna.fr. If you are allowed to contribute, you will see the official repo
4ME/4ME by clicking on the Gitlab logo in the top left corner.
Click on the Fork button. You are now on your own copy of 4ME repo.
Clone your fork on your computer
Open a terminal where you want to have the directory
By SSH (see
$ git clone firstname.lastname@example.org:prenom.nom/4ME.git
or by HTTPS
$ git clone https://gitlab.asap.dsna.fr/prenom.nom/4ME.git
If you have already clone your fork, go to
Update your fork section
Create a branch
From the branch master
git branch -b modif-env-lfff git branch * modif-env-lfff master
Never work directly on branch master, you should work on your own branch and then, merge the code on branch master.
Modify your environment
All environments are located in
- Be sure to have a
dev/.env file. If you not, copy the
dev/.envor create it. Only
FME_NODE_VERSIONvariable must be set (
8.9.3at least). The others variables are used to launch a development environment of 4ME.
- Install all dependencies, update tests and run the tests
sudo bash dev/bootstrap.sh yarn test -u (at the end, get back to the prompt by taping `CTRL+C`) sudo bash dev/test-env.sh
- All tests run by test-env.sh must be ok
Add your changes and commit them
$ git add packages/env
git status and verify only your changes had be staged (eventually with a snapshot in packages/env/test/data/components/snapshots)
$ git commit -m "your message to identify your changes"
Push your branch on your distant repo
$ git push -u origin modif-env-lfff
Submit a merge request
- Go to Gitlab :
- Go on your fork page
- Click on
create a merge requeston the top of the page, of go to
merge requestson the side bar and create a new one
- Verify the source branch is prenom.nom/4ME : modif-env-lfff and the target branch is 4ME/4ME : master
remove source branch when merge request is accepted
- Submit merge request
Update your fork
Add the official remote repo
$ git remote add upstream gitfr:4ME/4ME.git $ git remote -v origin https://gitlab.asap.dsna.fr/prenom.nom/4ME.git (fetch) origin https://gitlab.asap.dsna.fr/prenom.nom/4ME.git (push) upstream https://gitlab.asap.dsna.fr/4ME/4ME.git (fetch) upstream https://gitlab.asap.dsna.fr/4ME/4ME.git (push).asap.dsna.
Update your branch master
git fetch upstream git rebase upstream/master git push origin master
If you have issues for rebase your branch master, it's probably because you have unstaged modified files on your branch master (shame on you ! never work on branch master). To discard all your changes