If you are interested in contributing to |sname| development or running its latest source code, you should install the (GitLab) sources following the Installing TimageTK from sources procedure.
gitk development tools:
Ubuntu & Debian:
$ sudo apt-get install git gitk
Fedora & Redhat:
$ sudo yum install git gitk
sudo port install git-core +doc +bash_completion +gitweb
Edit the python code, but do not forget to write documentation and tests before submitting a merge request.
You can also contribute by raising issues you face with the code on the dedicated area of the GitLab repository.
NEVER EVER work on master, always on a branch!
Clone the official repository:
git clone firstname.lastname@example.org:mosaic/timagetk.git
Create development branch: #. Get latest version of origin/master:
git checkout master # go to your local master branch git pull master # update it with origin/master
Create your new branch (choose an explicit name):
git checkout -b wip_my_branch # create local branch wip_my_branch git push --set-origin origin wip_my_branch # attach branch wip_my_branch to origin
Work on your modifications: #. To add a new file
mynewfile.pyto git version control system:
git add mynewfile.py
To commit changes to git repository:
To push changes to git repository:
git push origin wip_my_branch # push modification to origin/wip_my_branch
Prepare your work for merging: #. Get latest version of origin/master:
git checkout master # go to your local master branch git pull origin master # update it with origin/master
It is safer to create a new branch for rebase:
git checkout wip_my_branch # go to your local development branch wip_my_branch git checkout -b my_branch # create and checkout new branch my_branch git rebase master # rebase local master branch with my_branch
If master has diverged during your work, fix conflicts (use meld), then say to git that conflicts are resolved:
git add file1 git rebase --continue # to finish rebase
git checkout master # go to your local master branch git pull origin master # update it with origin/master git merge --no-ff my_branch # use ‘--no-ff’ (no fast forward) to create a merge commit git push origin master # Then push it to origin/master
Finalization, check if you find all yours commits on origin/master, if yes:
git branch --delete my_branch # delete local development branch git push origin :my_branch # delete development branch on origin
To solve merge or rebase conflicts, we advise to either use the web IDE or to use a visual diff and merge tool such as meld.
For Ubuntu and Debian users:
sudo apt install meld
Git version control¶
gitk is a lightweight version control GUI, it is somewhat ugly and old.
We advise to use gitkraken (the free version) availables for Linux and and MacOSX.
For Ubuntu users, you can find a packaged version in
sudo snap install gitkraken
All supported platforms can be found here.