Changes between Initial version and Version 1 of Source_code

24 Mar 2018, 04:15:03 (6 years ago)

moved documentation for git from wiki page


  • Source_code

    v1 v1  
     1== OSGeoLive source code ==
     3=== Repositories ===
     5 /
     7 /
     10=== Git Background ===
     12Since Git is a distributed versioning system, it is very convenient for each developer/contributor to have a personal public copy of the "official" repository (also known as fork). Web hosting services like GitLab or GitHub provide this option. By forking this way you can make changes to a personal repository, then you can ask the core developers to review the code and merge accordingly through a "pull request".
     14=== Fork repository ===
     15From or select the "Fork" button to create your own fork of these repositories.
     16After forking these official repositories, your working repositories are: and
     18=== Copy your repository locally ===
     19On Linux systems get the source code locally using:
     22git clone
     23git clone
     26(On MS Windows systems, you can use [ TortoiseGit], which extends Windows Explorer to include git commands)
     28In order to be able to get and send changes to your public git repository, you need to link your local copy to your public copy. This is done automatically for you when you "git clone". The repository that you cloned from has the alias "origin".
     30=== add upstream ===
     31In order to be able to get changes that others do to the main repository, you need to manually link to that using:
     34git remote add upstream
     35git remote add upstream
     38=== setup git personal details ===
     40The first thing you should do when you install Git is to set your user name and e-mail address.
     43git config --global "John Doe"
     44git config --global
     47=== Commit access ===
     48On the git world, you don't need commit access to the main repository in order to contribute. You just work on your own fork and ask maintainers to merge your code through "pull requests".
     49Before you contribute to the project for the first time, you will need to confirm that you will comply with our license guidelines. Write something like:
     52''"Hi all, I'd like to contribute XXX to OSGeoLive. I confirm that my contributions to OSGeoLive will be compatible with the OSGeoLive license guidelines at the time of contribution."''
     55The licenses used for the OSGeoLive build scripts and documentation are:
     57* ''Creative Commons Attribution-ShareAlike 3.0 Unported License for Quickstarts''
     58* ''Creative Commons Attribution 3.0 Unported License for Project Overviews''
     59* ''LGPL version >=2.1 for the install scripts''
     60* ''One of the OSI approved Open Source licenses for installed applications''
     61* ''Public domain, CC-By-SA, and Open Data Commons Open Database License (ODbL) for data''
     63=== Add your name to contributors list ===
     65The first thing you should do to test your git setup is to add your name to the [ code contributors] or [ translators] list(s):
     68cd OSGeoLive-doc
     70# Pull any updates from upstream project (master is the equivalent of subversion trunk)
     71git pull upstream master
     73# Coders and creators of new content: edit contributors.csv
     74# please add your Name, Email, Country and Osgeo_id to the list, separated by comma
     75#  - Order alphabetical by first name,
     76#  - remove punctuation from email addresses to stop harvesting for junk mail
     78# optionally check to see what has changed.
     79git diff contributors.csv
     81# add the changes into stage area
     82git add contributors.csv
     84# commit changes locally
     85git commit -m "Added [my name] to contributors"
     87# send the changes to your public repository
     88git push origin master
     91At this point you can let others know that you have some changes that you want to merge, so you can use the button "Pull Request" on GitLab or GitHub. Or you can continue until you feel ready to share your code :)
     94# Translators: edit translators.csv
     95# same as above, but the order of columns is:
     96# Language, i18n code, Name, Country, Email, Osgeo_id
     97#  - Order alphabetically by language, then by first name
     98#  - remove punctuation from email addresses to stop harvesting for junk mail
     101Working with files:
     104# to add a file
     105cd <dir>
     107# create a file
     108git add <file>
     109git commit -m "commit message"
     110git push origin master
     112# to move or rename a file
     113#  *** please use instead of 'svn add' + 'svn rm', otherwise the
     114#      development history gets lost and database space is wasted ***
     115git mv <old filename> <new filename>
     116git commit -m "commit message"
     117git push origin master
     120Last step: pull request
     122In order to merge your work with the main repository, you have to make a pull request.
     124You can do it by logging on your github account and go to the branch you changed. Click on the New pull request green button. The changes you made previously while appear.
     126You can review and comment your request before submitting. To submit, click on the Create pull request green button. Then, you're done ! Good job !
     128More information about Github pull request here:
     130== Old SVN repository ==
     132For historical reason we keep the old SVN repository.