Changes between Initial Version and Version 1 of Source_code


Ignore:
Timestamp:
24 Mar 2018 04:15:03 (20 months ago)
Author:
lucadelu
Comment:

moved documentation for git from wiki page https://wiki.osgeo.org/wiki/OSGeoLive

Legend:

Unmodified
Added
Removed
Modified
  • Source_code

    v1 v1  
     1== OSGeoLive source code ==
     2
     3=== Repositories ===
     4
     5https://github.com/OSGeo/OSGeoLive / https://git.osgeo.org/gitea/osgeolive/OSGeoLive
     6
     7https://github.com/OSGeo/OSGeoLive-doc / https://git.osgeo.org/gitea/osgeolive/OSGeoLive-doc
     8
     9
     10=== Git Background ===
     11
     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".
     13
     14=== Fork repository ===
     15From https://github.com/OSGeo/OSGeoLive or https://github.com/OSGeo/OSGeoLive-doc select the "Fork" button to create your own fork of these repositories.
     16After forking these official repositories, your working repositories are: https://github.com/your_id/OSGeoLive and https://github.com/your_id/OSGeoLive-doc
     17
     18=== Copy your repository locally ===
     19On Linux systems get the source code locally using:
     20
     21{{{
     22git clone https://github.com/your_id/OSGeoLive
     23git clone https://github.com/your_id/OSGeoLive-doc
     24}}}
     25
     26(On MS Windows systems, you can use [https://code.google.com/p/tortoisegit/ TortoiseGit], which extends Windows Explorer to include git commands)
     27
     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".
     29
     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:
     32
     33{{{
     34git remote add upstream https://github.com/OSGeo/OSGeoLive
     35git remote add upstream https://github.com/OSGeo/OSGeoLive-doc
     36}}}
     37
     38=== setup git personal details ===
     39
     40The first thing you should do when you install Git is to set your user name and e-mail address.
     41
     42{{{
     43git config --global user.name "John Doe"
     44git config --global user.email johndoe@example.com
     45}}}
     46
     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:
     50
     51{{{
     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."''
     53}}}
     54
     55The licenses used for the OSGeoLive build scripts and documentation are:
     56
     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''
     62
     63=== Add your name to contributors list ===
     64
     65The first thing you should do to test your git setup is to add your name to the [https://github.com/OSGeo/OSGeoLive-doc/blob/master/contributors.csv code contributors] or [https://github.com/OSGeo/OSGeoLive-doc/blob/master/translators.csv translators] list(s):
     66
     67{{{
     68cd OSGeoLive-doc
     69
     70# Pull any updates from upstream project (master is the equivalent of subversion trunk)
     71git pull upstream master
     72
     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
     77 
     78# optionally check to see what has changed.
     79git diff contributors.csv
     80 
     81# add the changes into stage area
     82git add contributors.csv
     83
     84# commit changes locally
     85git commit -m "Added [my name] to contributors"
     86
     87# send the changes to your public repository
     88git push origin master
     89}}}
     90
     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 :)
     92
     93{{{
     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
     99}}}
     100
     101Working with files:
     102
     103{{{
     104# to add a file
     105cd <dir>
     106
     107# create a file
     108git add <file>
     109git commit -m "commit message"
     110git push origin master
     111
     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
     118}}}
     119
     120Last step: pull request
     121
     122In order to merge your work with the main repository, you have to make a pull request.
     123
     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.
     125
     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 !
     127
     128More information about Github pull request here: https://help.github.com/articles/using-pull-requests/
     129
     130== Old SVN repository ==
     131
     132For historical reason we keep the old SVN repository.
     133
     134https://svn.osgeo.org/osgeo/livedvd/gisvm/trunk/