Changes

no edit summary
Line 226: Line 226:  
*Type name or remote fork the developer has create (in most cases, it's developer Git login). For example: "'''thedevlogin'''". Choose also "'''Configure Fetch'''".
 
*Type name or remote fork the developer has create (in most cases, it's developer Git login). For example: "'''thedevlogin'''". Choose also "'''Configure Fetch'''".
 
*Type URI of Git repository of developer. For example: '''git://github.com/thedevlogin/dolibarr.git'''. Also add a refspec value to declare the branch you want to get. For example: '''refs/heads/master:refs/remotes/thedevlogin/master'''. Click "'''Save and Fetch'''". A new entry will be added into "Remote Tracking" making possible to read/get commits done into this branch.
 
*Type URI of Git repository of developer. For example: '''git://github.com/thedevlogin/dolibarr.git'''. Also add a refspec value to declare the branch you want to get. For example: '''refs/heads/master:refs/remotes/thedevlogin/master'''. Click "'''Save and Fetch'''". A new entry will be added into "Remote Tracking" making possible to read/get commits done into this branch.
 
+
Gehen Sie nun in die Kommandozeile Ihres Git-Repositorys (unter Linux ist es in den meisten Fällen  '''/home/yourlogin/git/yourdolibarr''') und geben Sie den Befehl git cherry-pick ein:
Now, go on command line of your git repository (in most cases on Linux, it's '''/home/yourlogin/git/yourdolibarr''') and type the git cherry-pick command:
   
<source lang="bash">
 
<source lang="bash">
 
git cherry-pick -x commitid
 
git cherry-pick -x commitid
 
</source>
 
</source>
where commitid is value of commit id you want to get.
+
wobei commitid der Wert der Commit-ID ist, die Sie erhalten möchten.
   −
Once this is done, go back to Eclipse and make a refresh on project. You will see modified files appears with decorators (with conflicts if there is).
+
Sobald dies erledigt ist, gehen Sie zurück zu Eclipse und aktualisieren Sie das Projekt. Sie werden sehen, dass geänderte Dateien mit Dekoratoren erscheinen (mit Konflikten, wenn es welche gibt).
   −
It the cherry-pick fails because of conflicts, you can cancel the cherry-pick try with
+
Wenn die Auswahl aufgrund von Konflikten fehlschlägt, können Sie den Versuch der Auswahl mit
 
<source lang="bash">
 
<source lang="bash">
 
git cherry-pick --abort
 
git cherry-pick --abort
 
</source>
 
</source>
   −
=Solving a conflict=
  −
If a file has been marked as "conflict" after a Pull, open the file to edit it.
  −
Find string "<<<<<<<<<<", you will see part of code that is conflict between "<<<<<<<<<" and ">>>>>>>>". Edit manually code lines and remove "<<<<<<<<" and ">>>>>>>".
     −
Then, right click on file and select "Add".
     −
If you prefer to forget completely all changes you made into all files (so to restore you workspace with content of remote repository), you can make a hard reset:
+
=Einen Konflikt lösen=
 +
Wenn eine Datei nach einem "Pull" als "Konflikt" markiert ist, öffnen Sie die Datei und bearbeiten Sie sie.
 +
Rechercher la chaine "<<<<<<<<<<", vous verrez la partie de code en conflit entre "<<<<<<<<<" et ">>>>>>>>". Bearbeiten Sie die Codezeilen manuell, um das Endergebnis zu erhalten, indem Sie auch die "<<<<<<<<" et ">>>>>>>".
 +
 
 +
Klicken Sie dann mit der rechten Maustaste auf die Datei und wählen Sie " Hinzufügen".
 +
 
 +
Wenn Sie lieber alle Änderungen, die Sie an allen Dateien vorgenommen haben, vollständig rückgängig machen möchten (um Ihren Arbeitsbereich mit dem Inhalt des entfernten Repositoriums wiederherzustellen), können Sie einen Reset durchführen:
   −
*With Eclipse: Right click on project top line and select "'''Reset'''" then "'''Hard'''" then "'''Reference - HEAD'''".
+
*Mit Eclipse klicken Sie mit der rechten Maustaste auf die oberste Zeile des Projekts und wählen Sie "Zurücksetzen" und dann "'''Hard'''" und dann "'''Reference - HEAD'''".
*With GIT Command Line Interface: You can achieve this with command
+
*Bei Verwendung des GIT-Befehlszeilentools erreichen Sie dies mit dem Befehl
    
<source lang="bash">
 
<source lang="bash">
git reset --hard HEAD
+
git reset --hard HEAD  
</source>
  −
To reset changes you commited but not pushed to origin
  −
<source lang="bash">
  −
git reset --hard origin/develop
   
</source>
 
</source>
   −
=Tagging sources=
+
=Taggen Sie die Quellen=
With GIT Command Line Interface:
+
Mit den GIT-Kommandozeilenwerkzeugen:
 
+
Um ein Tag über eine Version zu erstellen:
To add a tag to a current version:
   
<source lang="bash">
 
<source lang="bash">
 
git tag -a -m "Release|Maintenance release x.y.z" "x.y.z"
 
git tag -a -m "Release|Maintenance release x.y.z" "x.y.z"
or
+
oder
git tag -a -f -m "Beta x.y.betai" "x.y.betai_YYYYMMDD" idcommit  # -f force if an existing tag already exists, idcommit allows to choose commit to tag
+
git tag -a -f -m "Beta x.y.betai" "x.y.betai_YYYYMMDD" idcommit  # -f force wenn ein Tag bereits existiert, ermöglicht idcommit die Auswahl des zu taggenden Commits.
 
+
git push --tags  # Pour pousser le tags sur le serveur distant
git push --tags  # To push tags to remote origin
   
</source>
 
</source>
   −
To remove a tag:
+
Um einen Tag zu löschen:
 
<source lang="bash">
 
<source lang="bash">
 
git tag -d "x.y.z_YYYYMMDD"
 
git tag -d "x.y.z_YYYYMMDD"
git push remoteentryname :x.y.z_YYYYMMDD    # To validate delete on remote origin
+
git push origin :x.y.z_YYYYMMDD    # Um die Löschung auf dem entfernten Server zu bestätigen
 
</source>
 
</source>
   −
=Creating a new branch=
+
=Einen neue Branche erstellen=
With GIT Command Line Interface:
+
Hier ist der Befehl, den Sie verwenden müssen, um einen neuen Zweig aus einem eigenen develop-Repository zu erstellen:
 
  −
Create a clone (see previously) of the branch from where you want to create another branch, then go into directory and launch command:
   
<source lang="bash">
 
<source lang="bash">
 
git branch x.y
 
git branch x.y
Line 286: Line 279:  
</source>
 
</source>
   −
With Eclipse:
+
=Statistiken=
 +
Mit den GIT-Kommandozeilenwerkzeugen:
   −
Create a clone (see previously) of the branch from where you want to create another branch, with a checkout done. The go into view git. Choose branches, remote tracking and select start branch.
+
Um die Anzahl der Änderungen zu zählen, die ein Entwickler zwischen Version x und y vorgenommen hat:
Right click and choose "Create branch".
  −
Then make a push to create branch remotely.
  −
Then go into "Remotes - origins" and edit the entries to pull and push onto new branch.
  −
It may also be required to edit the .git/config file to have project linked by default onto new branch.
     −
=Deleting a branch=
+
*Zuerst führen Sie "git merge-base" aus, um die ID des letzten gemeinsamen Commits zwischen x und y zu erfahren.
With GIT Command Line Interface:
     −
Do a push on branch but add : before name of branch:
   
<source lang="bash">
 
<source lang="bash">
git push remoteentryname :branchnametodelete
+
git merge-base origin/3.1 origin/develop
 
</source>
 
</source>
   −
=Merging a maintenance branch x.x into dev branch=
+
*Dann führen Sie git log aus, um eine Liste aller Änderungen von der letzten gemeinsamen Übertragung bis zur letzten Übertragung zu erhalten.
With Eclipse:
  −
 
  −
*Go onto the root directory of project with a checkout of the dev branch.
  −
*Check fetch setup to be sure, this repository contains both information of dev branch and version x.x you want to merge.
  −
*Right click onto root directory and choose "Team - Merge". Select "x.x". Click onto "Merge options - Commit", because we want to commit merged branch if there is no conflicts.
  −
*Once merge is done, check everything is ok.
  −
*Commit and push.
  −
 
  −
=Pushing a branch onto another Git server=
  −
You may want to synchronize another GIT server.
  −
To synchronize push to another server, this is how to proceed.
  −
With Eclipse:
  −
 
  −
*Go onto Git clone view and add a remote with a name, choose "Configure push" and enter URL. For example, for name "sourceforge" and URL "ssh://yoursourceforgelogin@git.code.sf.net/p/dolibarr/code"
  −
*Just validate, a first push will be done automatically.
  −
*To force sync, run
  −
 
   
<source lang="bash">
 
<source lang="bash">
git push sourceforge develop
+
git log id_found_at_previous_step..HEAD
git push --tags sourceforge develop
   
</source>
 
</source>
   −
=Statistics=
+
*Um die Gesamtzahl der hinzugefügten/gelöschten Zeilen zu ermitteln:
With GIT Command Line interface:
  −
 
  −
To count number of changes developers have made between a version x and y:
  −
 
  −
*First, search commit id of tags you want to compare
  −
 
  −
To find id_start (common commit id between 2 versions/tags)
   
<source lang="bash">
 
<source lang="bash">
git merge-base refs/tags/3.3.0 origin/3.4
+
git log --ancestry-path --numstat --pretty="%H" id_found_at_previous_step..HEAD | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
or
  −
git merge-base 3.7 origin/develop
   
</source>
 
</source>
To find id_end, choose among
  −
<source lang="bash">
  −
git show-ref
  −
</source>
  −
Choose a value for id_start and id_end
  −
Note: id_end can be HEAD.
     −
*Then run git log to have list of all changes from last common commit to last commit
     −
<source lang="bash">
+
Zählen der endgültigen Änderungen zwischen einer Version x und y (dies unterscheidet sich von der vorherigen Zählung, da bei der vorherigen Zählung eine Änderung zweimal zu zwei verschiedenen Zeitpunkten durchgeführt werden kann, um unterschiedliche Änderungen vorzunehmen. Bei der zweiten Methode werden die Änderungen gezählt, die schließlich gefunden wurden, wenn die Änderungen beim ersten Versuch in Ordnung waren):
git log id_start..id_end
+
 
</source>
     −
*To get total number of added/deleted lines:
+
*Verwenden Sie die gleiche Methode wie zuvor, aber anstatt git log auszuführen, führen Sie '''git diff''' aus.
    
<source lang="bash">
 
<source lang="bash">
git log --ancestry-path --numstat --pretty="%H" id_start..id_end | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
+
git diff -b -M --numstat --pretty="%H" id_found_at_previous_step..HEAD | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
 
</source>
 
</source>
      −
To count number of changes finally between a version x and y (it differs from previous count because in previous count, a change can be done 2 times at two different moment to change differently. With second method, you count changes finally found if changes were ok at first try).  
+
Weitere Informationen über die Verwendung von GIT erhältlich unter: [http://wiki.eclipse.org/EGit/User_Guide ici].
 
  −
*Use same method than previously but instead of running git log, run git diff.
  −
 
  −
<source lang="bash">
  −
git diff -b -M --numstat --pretty="%H" id_start..id_end | awk 'NF==3 {plus+=$1; minus+=$2} END {printf("+%d, -%d\n", plus, minus)}'
  −
</source>
  −
 
     −
More information in GIT usage is available [http://wiki.eclipse.org/EGit/User_Guide here].
   
[[Category:Development]]
 
[[Category:Development]]
265

edits