User Tools

Site Tools


wiki:development:git

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Last revision Both sides next revision
wiki:development:git [2011/01/31 11:37]
sunweaver
wiki:development:git [2014/04/28 13:02]
sunweaver
Line 1: Line 1:
-====== X2go'Official GIT Repository ======+====== X2Go'Git Repository ======
  
-Within the X2go project development code is shared via a public GIT repository hosted by DAS-NETZWERKTEAM in Kiel, Nothern Germany (Servers: Hetzner Online AG). For any X2go GIT related questions, please contact our GIT repository administrator (currently: Mike Gabriel): ''git-admin (at) x2go (dot) org''.+Within the X2Go project development code is shared via a public GIT repository hosted by DAS-NETZWERKTEAM in Kiel, Nothern Germany (Servers: Hetzner Online AG). For any technical X2Go Git related questions, please contact our Git repository administrator (currently: Mike Gabriel): ''git-admin (at) x2go (dot) org'', a discussion about content should be held on the developers' mailing list: ''x2go-dev@lists.x2go.org''.
  
-===== Access to X2go's GIT-Repository at BerliOS =====+===== Access =====
  
-Browse the X2go GIT repository tree in a webbrowser (either with GitWEB or with Chora/Horde-Framework): +==== Browse the X2Go GIT repository tree in a web browser ====
  
-  * http://code.x2go.org/gitweb + 
-  * http://code.x2go.org/horde4/chora (experimental) +  * http://git.x2go.org/ 
-  +    
 The Web service is also available as a https service. To make secure browsing as smooth as possible, please import this Root-CA-Certificate into your web browser: http://das-netzwerkteam.de/NWT-ca.crt The Web service is also available as a https service. To make secure browsing as smooth as possible, please import this Root-CA-Certificate into your web browser: http://das-netzwerkteam.de/NWT-ca.crt
  
 +==== Anonymous X2Go Git Repository Access via Git-protocol (read-only) ====
  
-**Anonymous X2go GIT Repository Access via GIT protocol (read-only)** 
  
-The X2go project'BerliOS Developer GIT repository can be checked out through anonymous GIT with the following instruction set (in a Unix-like console session). +X2Go'Git projects can be cloned to a local copy through anonymous Git with the following instruction set (in a Unix-like console session). 
  
   $ mkdir -p ~/x2go   $ mkdir -p ~/x2go
Line 21: Line 21:
   $ git clone git://code.x2go.org/<package>    $ git clone git://code.x2go.org/<package> 
  
-For <package> names please refer to the GitWEB GUI (see above).+For <package> names please refer to the [[http://git.x2go.org|Git WebGUI]] (see above).
  
-**Contributing to X2go**+===== Contributing to X2Go =====
  
-Only project developers can access the GIT tree via the SSH method. Please understand that we only restrictively grant write access to our GIT repository. However, you can send us patches via Mail (git-send-email). For submitting X2go patchesplease use this eMail address:+Before you start contributing make sure git git knows who you areas this is added to the patches.
  
-  patches@x2go.org+==== Setup Git Configuration ====
  
-**Developer GIT Access via SSH**+Now it is time to set up your system environment for working with Git. Main thing is to tell Git who you are. For this edit the file ''~/.gitconfig'' with your favourite editor and put the followings lines in it (of course, you may want to personalize some of the fields):
  
 +<code>
 +[user]
 +        name = <Firstname Lastname>
 +        email = <my.mailaccount@mydomain.com>
 +</code>
  
-As an X2go developer, please substitute the field <developername> in the text below with your account login name. Substitute <package> with the X2go source package that you want to work on, substitute <branch> with the name of the branch of <package> you are contributing to. The SSH <port> to use for GIT write access will be provided to developers only and will not be named in this Wiki. Enter your code.x2go.org Git site password when prompted.+==== Sending in Patches ==== 
 + 
 +Only project developers can access X2Go's Git tree via the SSH method. Please understand that we only restrictively grant write access to our GIT repository. However, you can send us patches via Mail (git-send-email). For submitting X2Go patches, please use the [[wiki:bugs|X2Go Bug Tracker System]]. 
 + 
 + 
 +==== Developer Git Access via SSH ==== 
 + 
 + 
 +In the instruction set below, substitute <package> with the X2Go source package that you want to work on, substitute <branch> with the name of the branch of <package> you are contributing to. The SSH <port> to use for Git write access will be provided to developers only and will not be named in this Wiki. Access via SSH will only be granted by SSH public key authentication (no password auth).
  
   $ cd ~/x2go/<package>   $ cd ~/x2go/<package>
-  $ git push ssh://<developername>@code.x2go.org:<port>/srv/git/code.x2go.org/<package> <branch>+  $ git push ssh://x2go@code.x2go.org:<port>/srv/git/code.x2go.org/<package> <branch> 
 + 
 +==== SSH Key Fingerprints of code.x2go.org (FQDN: ymir.das-netzwerkteam.de) ====
  
-**SSH Key Fingerprints of code.x2go.org (fqdn: ymir.das-netzwerkteam.de)** 
      
   RSA Key: ab:cd:4b:b2:d1:d1:19:11:ed:24:83:5a:06:b1:d4:d3   RSA Key: ab:cd:4b:b2:d1:d1:19:11:ed:24:83:5a:06:b1:d4:d3
  
-**Commits / Tags via e-Mail**+===== Commits / Tags via e-Mail ===== 
 + 
 +Commits and tags in X2Go Git are posted as e-Mails to two different mailing lists: 
 + 
 +  Git commits -> x2go-commits@lists.x2go.org (https://lists.x2go.org/listinfo/x2go-commits) 
 +  Git tags -> x2go-tags@lists.x2go.org (https://lists.x2go.org/listinfo/x2go-tags) 
 + 
 +These mailing lists can be subscribed to by anyone who is interested in X2Go Git changes. However, beware that there might be phases during which you get flooded by mails. Furthermore the lists are read-only. Postings to these lists will be dropped automatically by the mailing list service.  
 + 
 +Both mailing lists are also archived at Gmane: 
 + 
 +  * [[http://blog.gmane.org/gmane.linux.terminal-server.x2go.scm|gmane.linux.terminal-server.x2go.scm]] -- X2Go Git commit messages (read-only) 
 +  * [[http://blog.gmane.org/gmane.linux.terminal-server.x2go.tags|gmane.linux.terminal-server.x2go.tags]] -- X2Go Git taggings (read-only) 
 + 
 +===== Snippets ==== 
 + 
 +==== Checkout all repos ==== 
 +Just copy and paste into a bash terminal:  
 +<code> 
 +for REP in \ 
 +buildscripts.git \ 
 +cups-x2go.git \ 
 +libjpeg-turbo.git \ 
 +libpam-x2go.git \ 
 +lightdm-remote-session-x2go.git \ 
 +ltsp-pyhocathinclient.git \ 
 +nx-libs.git \ 
 +pinentry-x2go.git \ 
 +pyhoca-cli.git \ 
 +pyhoca-contrib.git \ 
 +pyhoca-gui.git \ 
 +python-paramiko.git \ 
 +python-x2go.git \ 
 +x2go-keyring.git \ 
 +x2goadmincenter.git \ 
 +x2gobroker.git \ 
 +x2goclient-contrib.git \ 
 +x2goclient.git \ 
 +x2goclient2.git \ 
 +x2godesktop-applet.git \ 
 +x2godesktopsharing.git \ 
 +x2gognomebindings.git \ 
 +x2golxdebindings.git \ 
 +x2goplasmabindings.git \ 
 +x2goserver.git \ 
 +x2gothinclient.git \ 
 +x2gotrinitybindings.git \ 
 +z99.ubuntu/libev.git \ 
 +z99.ubuntu/python-crypto.git \ 
 +z99.ubuntu/python-gevent.git \ 
 +z99.ubuntu/python-greenlet.git \ 
 +z99.ubuntu/python-pampy.git \ 
 +z99.ubuntu/python-setproctitle.git \ 
 +; do git clone git://code.x2go.org/$REP; done 
 +</code> 
 + 
 +==== Get Updates for all Repos ==== 
 +Just copy and paste into a bash terminal:  
 + 
 +<code> 
 +for REP in \ 
 +buildscripts \ 
 +cups-x2go \ 
 +libjpeg-turbo \ 
 +libpam-x2go \ 
 +lightdm-remote-session-x2go \ 
 +ltsp-pyhocathinclient \ 
 +nx-libs \ 
 +pinentry-x2go \ 
 +pyhoca-cli \ 
 +pyhoca-contrib \ 
 +pyhoca-gui \ 
 +python-paramiko \ 
 +python-x2go \ 
 +x2go-keyring \ 
 +x2goadmincenter \ 
 +x2gobroker \ 
 +x2goclient-contrib \ 
 +x2goclient \ 
 +x2goclient2 \ 
 +x2godesktop-applet \ 
 +x2godesktopsharing \ 
 +x2gognomebindings \ 
 +x2golxdebindings \ 
 +x2goplasmabindings \ 
 +x2goserver \ 
 +x2gothinclient \ 
 +x2gotrinitybindings \ 
 +z99.ubuntu/libev \ 
 +z99.ubuntu/python-crypto \ 
 +z99.ubuntu/python-gevent \ 
 +z99.ubuntu/python-greenlet \ 
 +z99.ubuntu/python-pampy \ 
 +z99.ubuntu/python-setproctitle \ 
 +; do cd $REP && git pull && cd .. ; done 
 +</code> 
 +===== Maintenance ===== 
 + 
 +<note warning>This is only for admins having access to the X2Go Git server.</note> 
 + 
 +==== Create new Git Project on X2Go Git ==== 
 + 
 +Create a local Git project: 
 + 
 +<code> 
 +$ mkdir -p ~/MyCode/x2go-upstream/x2gonewthing 
 +$ cd ~/MyCode/x2go-upstream/x2gonewthing 
 +$ git init 
 +</code> 
 + 
 +Then add your first files to the new ''x2gonewthing'' project. Commit these files as the first commit. Maybe commit more... 
 + 
 +Then run the following command sequence: 
 + 
 +<code> 
 +$ cd ~/MyCode/x2go-upstream/ 
 +$ x2go-gitcreate x2gonewthing 
 +# if the Git creation succeeds (check via http://code.x2go.org/gitweb), only then... 
 +$ rm x2gonewthing -Rfv 
 +$ git clone ssh://x2go@code.x2go.org:32032/srv/git/code.x2go.org/x2gonewthing.git 
 +</code> 
 + 
 +Now you can start working on your new X2Go project as on any of the other already existing X2Go Git projects. 
 + 
 +==== Edit Git Configs ==== 
 + 
 +As ''x2go-admin'' on ''code.x2go.org'': 
 + 
 +<code> 
 +$ cd /srv/git/code.x2go.org/<x2go-project>.git 
 +$ vim config 
 +</code> 
 + 
 +==== Edit Git Descriptions ==== 
 + 
 +As ''x2go-admin'' on ''code.x2go.org'': 
 + 
 +<code> 
 +$ cd /srv/git/code.x2go.org/<x2go-project>.git 
 +$ vim description 
 +</code> 
 + 
 +==== Edit Git ACLs ==== 
 + 
 +Unused feature, may come later... 
 + 
 + 
 +===== Backyard ===== 
 + 
 +==== Reverting Merge Commits ==== 
 + 
 +If you forget to run ''git-pull'' before modifying code files you will run into merge problems when committing your changes. 
 + 
 +There is nothing bad about merge commits apart from the fact that the X2Go Git system won't allow them being pushed to the server :-/. 
 + 
 +Thus, you probably want to avoid merge commits right from the beginning. However, from time to time it occurs that you crunch your Git log with a merge commit. This is how such a thing can happen: 
 + 
 +  * change a file 
 +  * commit it locally 
 +  * push it to X2Go Git 
 +  * find that the push operation gets rejected :-( 
 +  * then run ''git-pull'' instead 
 +  * and then uuups... realize: the ''git-pull'' fetched in some code for the same file, I have just been working on...) -> you probably forgot to run a ''git-pull'' before starting to work on that particular file...
  
-Commits and tags in X2go Git are posted as e-Mails to two different mailing lists:+One possible solution for this is //cherry-picking//. Here is an example (presuming that your are working on the master branch):
  
-  * Git commits -x2go-commits@lists.berlios.de (https://lists.berlios.de/mailman/listinfo/x2go-commits) +<code
-  * Git tags -> x2go-announcement@lists.berlios.de (https://lists.berlios.de/mailman/listinfo/x2go-announcement)+# make a temporary backup copy of the master branch 
 +$ git checkout -b master-bak-tmp
  
-These mailing lists can be subscribed to by anyone who is interested in X2go Git changes. However, beware that there might be phases you get flooded by mails, if you subscribe to any of these lists. Furthermore the lists are read-only. Postings to these lists will be dropped automatically by the mailing list service.+# go back to master branch 
 +$ git checkout master
  
-===== Objectives  and Background Information =====+and reset it to that refspec where local Git and server's Git were known to be still in sync 
 +$ git reset --hard <last-refspec-known-to-be-identical-with-server>
  
-  * Our goal is to give the online community convenient access to our most recent work.  +# then take a look at the log of your old local master branch 
-  * We have chosen a server location in Germany as one of our demands to the provider is that the GIT portal's WebGUI must not offend German laws regarding privacy protection.  +$ git log master-bak-tmp
-  * We have chosen not to host the GIT ourselves, but have found a sponsor for hosting X2go GIT (http://das-netzwerkteam.de) +
-  * Community members can apply for a GIT branch in X2go's BerliOS GIT repository. The person who applies for a branch (please contact our GIT administrator, if you want to apply, for the contact mail see above) will further on be called the »branch owner«. Branch owners can gather people around them. However, the branch owner will be the only person that can push to the designated branch on the official X2go GIT server. Server access will be granted via SSH public/private key authentication. +
-  * The X2go team encourages you to form teams and work on your own branch and create your own blend of X2go. This will enable us all to cooperate and benefit from each others' work.+
  
-===== GIT Policies =====+# now cherry-pick your local changes individually from the master-bak-tmp branch (where refspec-1 ... refspec-n are the commit hashes of each commit): 
 +$ git cherry-pick <refspec-1> 
 +$ git cherry-pick <refspec-2> 
 +... 
 +$ git cherry-pick <refspec-n>
  
-On each GIT repositories (one GIT per source package) there are 2 permanent branches:+# finally drop the tmp backup of old master 
 +$ git branch -D master-bak-tmp 
 +</code>
  
-  * **master branch** +==== Pushing to X2Go Git ====
-  * **develop branch**+
  
-An X2go __release__ always __means a merge__ from the **develop branch** to the **master branch** that then gets tagged with the upstream version number.+Whenever your local X2Go Git project is in an acceptable state for the community, feel free to push the code to the X2Go Git server:
  
-All X2go components that have been accepted for a future release can be found in the **develop branch**+<code> 
 +$ git push 
 +</code>
  
-There can be different temporary branches around release management:+<note> 
 +When working on master's HEAD do not wait __too__ long before pushing them to the server as it may happen that others work on master's HEAD as well.
  
-  * **release branches** (release-<target-version>)  +Keeping back code for too long can result in code conflicts (changes in the same code block of the same file by two different developers). 
-    * -> branches off from **develop branch** +</note>
-    * -> merges into **master branch** +
-  * **hotfix branches** (hotfix-<target-version>+
-    * -> branches off from **master branch** +
-    * -> merges back into **master branch** (and **develop branch** if needed)+
  
-And there can be different temporary branches around feature development. These branches we call feature branches:+The update scripts of X2Go Git will shout warnings at you while pushing. These warnings relate to
  
-  * ** feature branches** (branch-<feature-name>+  * whitespaces found at the end of lines 
-    * -> branches off from **develop branch** +  tabs found in the file (for Python: no tabs, for Bash, Perl, C++, etc. tabs are wanted, so you can ignore these if not coding Python
-    * -> if feature gets accepted: merges back into **develop branch**+  no \newline at end of file
  
-Further policies are:+You may consider silencing those warnings before committing the next time...
  
-  * Every GIT branch is readable by the public, there can be no private branches 
-  * The master branch is maintained by the X2go core development team (currently: Alex & Heinz) 
-  * The develop branch is maintained by the X2go core development team (currently: Alex & Heinz) 
  
  
wiki/development/git.txt · Last modified: 2020/05/28 22:43 by danger89