diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/286/0/.cp/icons/full/wizban/run_wiz.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/286/0/.cp/icons/full/wizban/run_wiz.png"
index 68af6b95f0030f2a2420c445c39292563123e7c7..16edc87bcb44b7392174937ca73763c3a88afe3c 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/286/0/.cp/icons/full/wizban/run_wiz.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/286/0/.cp/icons/full/wizban/run_wiz.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/310/0/.cp/icons/full/etool16/fastview_restore.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/310/0/.cp/icons/full/etool16/fastview_restore.png"
index 8bb4153b99b3fde7ad986d0e0cf684ccd4f44d33..6ac679f4d3d0b075b15db3e206a775ea990b38e0 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/310/0/.cp/icons/full/etool16/fastview_restore.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/310/0/.cp/icons/full/etool16/fastview_restore.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/311/0/.cp/icons/full/elcl16/view_menu.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/311/0/.cp/icons/full/elcl16/view_menu.png"
index 2a08fe4a85474bc84445adf1fd100351d58914c6..d8dc2f8fbc29f784509e45c726a5d5be1e787a07 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/311/0/.cp/icons/full/elcl16/view_menu.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/311/0/.cp/icons/full/elcl16/view_menu.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/311/0/.cp/icons/full/ovr16/pinned_ovr.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/311/0/.cp/icons/full/ovr16/pinned_ovr.png"
index d5fbfed7baab52ed052680ac53c7c3afe0c00777..645d395e3c4ef296e5283dc51c8afbee61590931 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/311/0/.cp/icons/full/ovr16/pinned_ovr.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/311/0/.cp/icons/full/ovr16/pinned_ovr.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/312/0/.cp/images/dragHandle-rotated.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/312/0/.cp/images/dragHandle-rotated.png"
index f38b2e403b26ee0aa70e4fbb13a97729223b394e..7f4ee606924147bb8932031bbda9e5eb60fc0d9d 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/312/0/.cp/images/dragHandle-rotated.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/312/0/.cp/images/dragHandle-rotated.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/312/0/.cp/images/dragHandle.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/312/0/.cp/images/dragHandle.png"
index 154d47df92e2e1f06887cb812c9b7c089f820e13..e8cc22ca0e3ae9093eec0c49cc3b897de1db9f7f 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/312/0/.cp/images/dragHandle.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/312/0/.cp/images/dragHandle.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/dlcl16/runcoverage.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/dlcl16/runcoverage.png"
index 8fb11877dc854d2e8ab9836b19335b37e7ca9e04..0c9fdcb30dc73e1b912fc67cb1beafcf497cca2c 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/dlcl16/runcoverage.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/dlcl16/runcoverage.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/elcl16/relaunch.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/elcl16/relaunch.png"
index 94120bd0e4147431b98d004b7712040804ac3269..106f04500f5b9abdfebf7ed054dc5c20c91a1660 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/elcl16/relaunch.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/elcl16/relaunch.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/elcl16/runcoverage.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/elcl16/runcoverage.png"
index 9dd57550802a72e9c11f278892afa4dc0a1e7d95..d01a20ca0ccdfdf671f48e0559156085564e2bd6 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/elcl16/runcoverage.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/elcl16/runcoverage.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/etool16/java_launch.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/etool16/java_launch.png"
index 57656d8f009414e8b4d4f5942d8b12446e54cb90..262c6c00dfe8877431353e5c608b22b9bcb9b6f5 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/etool16/java_launch.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/etool16/java_launch.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/eview16/coverage.png" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/eview16/coverage.png"
index 01bc4832fbdc98a99071ea7c996862cac204c79b..276b995c8b0fbb96e86aac903f4099243698982c 100644
Binary files "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/eview16/coverage.png" and "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/327/0/.cp/icons/full/eview16/coverage.png" differ
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/about.html" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/about.html"
index 01be62bb1412447160de2984bcdf47df390bc51b..54f1e2a2229f0ccbf5dced78238a8ab8023ac9f2 100644
--- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/about.html"
+++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/about.html"
@@ -1,3 +1,36 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:82904da402ed44f3f2e5ce0d668a0d383f19998259c51f2bedbc55c32a80badd
-size 1464
+
+
+
+
+About
+
+
+
About This Content
+
+
November 30, 2017
+
License
+
+
+ The Eclipse Foundation makes available all content in this plug-in
+ ("Content"). Unless otherwise indicated below, the Content
+ is provided to you under the terms and conditions of the Eclipse
+ Public License Version 2.0 ("EPL"). A copy of the EPL is
+ available at https://www.eclipse.org/legal/epl-2.0.
+ For purposes of the EPL, "Program" will mean the Content.
+
+
+
+ If you did not receive this Content directly from the Eclipse
+ Foundation, the Content is being redistributed by another party
+ ("Redistributor") and different terms and conditions may
+ apply to your use of any object code in the Content. Check the
+ Redistributor's license that was provided with the Content. If no such
+ license exists, contact the Redistributor. Unless otherwise indicated
+ below, the terms and conditions of the EPL still apply to any source
+ code in the Content and such source code may be obtained at https://www.eclipse.org.
+
+
+
+
\ No newline at end of file
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/cheatsheets/clone.xml" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/cheatsheets/clone.xml"
index 40e781439d4e2d3c521cb625ad30bfdebaaf5c7e..9a83466b4aa3c0479740fb66d413a2a99d054264 100644
--- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/cheatsheets/clone.xml"
+++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/cheatsheets/clone.xml"
@@ -1,3 +1,60 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:374cd4380e0787a37644ef1ee334df9e5e9d1fe76a9a46df65ff2ef07d230c71
-size 3562
+
+
+
+
+
+ With the Git Clone Wizard you can clone repositories using different transport protocols.
+
+
+
+
+ The clone wizard can be started by clicking "Click to perform" below.
+ Alternatively you can launch this wizard from the "Import Projects from Git" wizard using "Import... > Git > Projects from Git > Next > Clone..." or from the "Git Repositories View" using the "Clone a Git Repository" toolbar button.
+ To start this cheat sheet from a separately opened wizard, click the help icon and then select "Cloning a Git Repository".
+
+
+
+
+
+ Depending on which additional plug-ins have been installed, you may need to choose between different sources for cloning the repository.
+ If you are not sure, choose "Clone URI" from the list of available sources.
+ If the wizard is already asking your for repository details like a URI, then you can skip to the next item in the cheat sheet.
+
+
+
+
+ Enter the repository location.
+ If you already have a repository URI in your clipboard, i.e. copied from a gitweb, github, wiki or any other page, it will be automatically entered into the URI field. The other fields (i.e. Host, Repository path, Protocol, Port) will then be automatically filled.
+ In case cloning requires authentication (which is not the case for many repositories), enter your credentials into the User and Password fields.
+ For a complete description of all fields as well as the supported protocols, see the referenced documentation (click on help icon on top of this section).
+ Click Next
+
+
+
+
+ Choose branches to be cloned from the repository.
+ By default all available branches are checked.
+ Click Next
+
+
+
+
+ Define local storage settings.
+ Specify the destination directory of the cloned repository. If this directory does not yet exist, it will be created by the wizard.
+ Optionally, you can change the initial branch that will be created and checked out locally. The default remote name is 'origin'. This can also be changed if necessary.
+ Click Finish to end the wizard.
+
+ You have now successfully cloned a Git repository.
+
+
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/cheatsheets/push.xml" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/cheatsheets/push.xml"
index 69c55fa296cbd30fb4b7d1c3a33c13db99b5d86d..76aa8add590f953494b9486de319e64eab8779a7 100644
--- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/cheatsheets/push.xml"
+++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/cheatsheets/push.xml"
@@ -1,3 +1,70 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:b048a366eaf11ec19938054857512da4dc734e7bd171f48699dae91ed3b61b4f
-size 4552
+
+
+
+
+
+ With the Git Push Wizard you can push commits to another repository using different transport protocols.
+
+
+
+
+ The push wizard can be started from the context menu on a repository or project by "Push..." or "Team > Push...".
+ To start this cheat sheet from within the opened wizard, click the help icon and then select "Pushing to another Git Repository".
+
+
+
+
+ Select a push specification or enter the repository location.
+ If you already configured a push specification, you can select it from the "Configured remote repository" drop-down list. Otherwise you have to specify the URI of a repository you want to push to as follows:
+ If you have a repository URI in your clipboard, i.e. copied from a gitweb, github, wiki or any other page, it will be automatically entered into the URI field. The other fields (i.e. Host, Repository path, Protocol, Port) will then be automatically filled.
+ In case pushing requires authentication (which is the most likely case), enter your credentials into the User and Password fields.
+
+
+
+
+ If you connect to the repository via SSH for the first time, you have to accept the host key of the repository before proceeding.
+ In case your SSH key is protected by a passphrase, you have to enter it in a dialog that opens automatically.
+
+
+
+
+ Specify reference mappings
+ To map your local branch names to the same branch names that are available in the destination repository click "Add all branches spec".
+ If you want to declare different mappings, either enter reference names into the "Source ref" and "Destination ref" fields or select an existing entry from the drop-down lists. Afterwards click "Add Spec" to transfer the mapping into the "Specifications for push" list.
+ A typical mapping is 'HEAD' as source reference and 'refs/heads/master' as destination reference. This means that the current HEAD (which points to the currently checked out branch) is mapped to the destination master branch.
+ When pushing to a Gerrit code review system enter 'refs/for/master' as destination reference. This pushes the change to the review queue for the master branch.
+
+
+
+
+ Confirm the push configuration
+ A preview of all changes pushed to the destination repository is shown. The "Status" column contains '[new branch]' for references that will be newly created in the destination repository. For reference updates, the range of commits will be shown, i.e. the SHA1 of the first and the last commit to be pushed.
+ Click Finish.
+
+
+
+
+ The results page shows a list similar to the previous page and a confirmation message from the destination repository.
+ In case of errors the error message from the destination repository is displayed as well.
+ Click Ok to end the wizard.
+
+ You have now successfully pushed to another Git repository.
+
+
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/contexts.xml" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/contexts.xml"
index d1ba65fb32318b993ef9d5eac3fc6a206e1325b6..579473313fffd7ad6aa37a74228b48e75e938820 100644
--- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/contexts.xml"
+++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/contexts.xml"
@@ -1,3 +1,29 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:213435f50d18248a72e1fe59152e974a5ef8ae04ba3392da6501d0251e78ec0d
-size 1317
+
+
+
+
+
+ To be guided through this wizard start the cheat sheet 'Cloning a Git Repository' below.
+
+
+
+ To be guided through this wizard start the cheat sheet 'Pushing to another Git Repository' below.
+
+
+
+
+
+
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/contexts/GpgConfiguration.html" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/contexts/GpgConfiguration.html"
index 0b5228519b47bd867c62d69af1048cc737273045..e0be065e5d3c07d324437b7772bdfc33f333a376 100644
--- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/contexts/GpgConfiguration.html"
+++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/contexts/GpgConfiguration.html"
@@ -1,3 +1,98 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:86aadaefd952171bfa20f1c519e84e2eaedc4505e2e8b9f4cd25478d14e7e0c1
-size 4490
+
+
+
+
+
+
+ Configuring GPG for use with Eclipse
+
+
+
+
Configuring GPG for use with Eclipse
+
+For using an external GPG program with Eclipse, GPG must be configured to use a GUI
+pop-up dialog for user interaction, for instance when asking for key passphrases or
+smartcard PINs.
+
+
+Standard installations of GPG such as the distributions available from
+GnuPG are normally
+set up correctly out of the box. But in some cases, GPG on a system may be configured
+to ask the user for passphrases and such always via a terminal (a command window).
+In that case, GPG cannot be used by Eclipse.
+
+
Getting a Passphrase Dialog
+
+In GPG, it is not the gpg program itself that asks for passphrases.
+Instead, GPG uses a "hidden" system program gpg-agent to manage keys,
+and that gpg-agent program in turn uses yet another program called
+pinentry for actually asking the user for input. When gpg
+is invoked to sign something, it starts gpg-agent if that isn't
+running already. Once started, gpg-agent will continue running in
+the background, and will be re-used by future gpg operations.
+
+
+How GPG asks the user for passphrases is thus determined by how the gpg-agent
+is configured. There are several possible reasons why gpg-agent might
+use a terminal input instead of a GUI dialog:
+
+
+
Environment variable GPG_TTY
+
+
+The gpg-agent might have been started with environment variable
+GPG_TTY being set. In that case, it may be sufficient to terminate
+("kill") the currently running gpg-agent process. When called from
+Eclipse, GPG_TTY is not set, so if the Eclipse invokes
+GPG the next time, the gpg-agent should start normally and use a GUI
+dialog.
+
+
If that works, figure out where in your system GPG_TTY is set and do
+not set it to prevent the problem from re-occurring.
+
+
+
Fixed pinentry configuration
+
+
+The gpg-agent may be configured to use a particular pinentry
+program. This configuration is in a file gpg-agent.conf in the user's
+GPG directory, on Unix at ~/.gnupg/gpg-agent.conf, on Windows at
+%APP_DATA%/gnupg/gpg-agent.conf. This file may contain a configuration
+for pinentry-program, which may be set to pinentry-tty or
+pinentry-curses. In this case, remove the line or configure a GUI
+pinentry explicitly, and terminate the currently running gpg-agent process
+and optionally restart it. (Otherwise it will be restarted on the next GPG operation
+automatically.)
+
+
+
Missing GUI pinentry program
+
+
+Your system may not have a pinentry for a GUI dialog installed. This should
+rarely happen, and if so, only with third-party packages of GPG. Install the missing
+pinentry programs on your system using the system's package installation tool.
+
+
+
Custom pinentry script
+
+
+For advanced users: some people reconfigure the GPG pinentry via gpg-agent.conf
+by setting pinentry-program to a custom script that decides based on the
+value of environment variable PINENTRY_USER_DATA whether to prompt via
+a GUI dialog or via a terminal. If you have such a setup, make sure the script uses a
+GUI dialog pinentry when the variable is not set. When called via Eclipse,
+PINENTRY_USER_DATA is not set.
+
+
+
+
+
\ No newline at end of file
diff --git "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/help/EGit/Contributor_Guide/Automated-Developer-Setup.html" "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/help/EGit/Contributor_Guide/Automated-Developer-Setup.html"
index e861f01d8505455070ed0dd3fc0282cdd3a029d2..381aa6fbfde3fb396839165aaf20a3582d515c1e 100644
--- "a/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/help/EGit/Contributor_Guide/Automated-Developer-Setup.html"
+++ "b/Java\345\274\200\345\217\221\347\216\257\345\242\203\345\256\211\350\243\205/eclipse-jee-2024-06-R-win32-x86_64/eclipse/configuration/org.eclipse.osgi/330/0/.cp/help/EGit/Contributor_Guide/Automated-Developer-Setup.html"
@@ -1,3 +1,124 @@
-version https://git-lfs.github.com/spec/v1
-oid sha256:03d14bcedda4a654d12569c10793dbfbe3a75974b415368cc9368c21b9fff01d
-size 5359
+
+
+
+
+ EGit Contributor Guide - Automated Developer Setup
+
+
+
+
The fastest developer setup for contributing to JGit/EGit is to use the Eclipse Installer and the
+ EGit project setup to prepare an Eclipse IDE for JGit/EGit:
if the right most icon in the bottom toolbar of the installer rotates, there is an update available for the installer, which should be installed before continuing
+
if you are behind a proxy, change the proxy settings from the toolbar at the bottom
+
+
+
+
+
+
on the product page select "Eclipse IDE for Eclipse Committers" and click "Next"
+
+
+
+
+
+
on the project page select project "EGit" and click "Next"
+
+
+
+
+
+
on Variables page accept default target platform, to fine tune variables click "Show all variables", click "Next"
+
on the Confirmation page click "Finish"
+
+
+
+
+
+
the installer installs the chosen IDE and starts it, as soon as the installer says "Press Finish to close the dialog" you can close the installer window
+
the newly installed IDE will automatically clone the JGit and EGit repositories and configure the workbench for JGit/EGit development. You can observe the setup progress in the toolbar, if necessary you can reopen the setup wizard by clicking its icon in the status bar
+
+
+
+
+
+
when the setup finished the IDE should looks similar to this
+
+
+
+
+
If you want to improve the EGit project setup, check the setup file in tools\oomph\EGit.setup (in your newly cloned egit repository). You can find more information about Oomph at
and check the option "Committer-only group for handling security advisories in a closed fashion."
+
describe the vulnerability
+
+
this will ensure that the discussion on the vulnerability is kept private between the reporter and the committer group
+ until the project prepared a release fixing the vulnerability
To get notified of bugs, go to your e-mail preferences and add <product>.<component>-inbox@eclipse.org to your watch list. For example to get notified of EGit UI bugs, add
+ egit.ui-inbox@eclipse.org.
+
+
Keywords
+
To simplify bug management we started to tag EGit bugs with additional pseudo keywords (not normal Bugzilla keywords). The tags are prepended to the bug's summary field. Since we use these tags for internal bug management reporters of a bug should not add any pseudo keywords when filing the bug. The owner of the component bucket is responsible to add the keywords.
+
Keywords are used to group bugs without assigning them to a developer. So with the introduction of the keywords it is easy to search for all bugs belonging to a specific sub component. For example to get an overview of all open refactoring issues search for new, assigned or reopened bugs containing the word [refactoring] in the summary field.
+
Be aware that not all bugs are tagged with keywords, only bugs that belong to a certain sub group may have a tag attached. The following lists some of the currently used tags.
+
+
+
Tag
+
Description
+
Link
+
+
+
[sync]
+
everything related to Synchronize / Synchronize View
To build JGit or EGit versions <= 5.12.0 maven must be run using Java 1.8. Ensure that environment variable JAVA_HOME points to a Java 1.8 installation.
+
EGit versions >= 5.12.1 and < 6.0.0 can be built with any Java >= 1.8, but the build uses
+ maven toolchain definitions. To run a local EGit build for these versions (including the 'master' branch, i.e. EGit nightly), you need to have a local file
+ ~/.m2/toolchains.xml providing at least a JDK toolchain definition for "JavaSE-1.8":
+
The jdkHome directory is the one that contains the bin directory in which there is the java executable.
+
Also include a definition for a Java 11 toolchain as shown above.
+
+
EGit versions >= 6.0.0 require at least Java 11 to build, and require a Java 11 toolchain definition for running the tests.
+
EGit versions >= 6.6.0 require at least Java 17 to build, and require a Java 11 toolchain definition for running the tests.
+
+
+
JGit versions < 6.0.0 with maven require running maven with Java 1.8 in all cases.
+
JGit versions >= 6.0.0 with maven require running maven and compiling with at least Java 11.
+
JGit versions >= 6.6.0 with maven require running maven with at least Java 17.
+
+
+
Due to a
+ limitation of Tycho it is not possible to mix pom-first and manifest-first builds in the same reactor build hence the pom-first JGit build has to run separately before the build for the manifest-first JGit packaging project.
+
+
The local maven builds must share the same local Maven repository otherwise dependencies between these builds cannot be resolved.
To run the JGit maven build on a
+ case-insensitive file system, you might need to suppress javadoc generation if you get an error "class IO clashes with package of same name". Use "mvn clean install -Dmaven.javadoc.skip=true" instead of plain "mvn clean install".
+
+
+
Complete build sequence for a clean build (assuming $M2_HOME/bin is on the path and local Maven repository at ~/.m2/repository):
+
+[~/src/jgit] $ mvn clean install
+[INFO] Scanning for projects...
+...
+
+[~/src/jgit] $ mvn -f org.eclipse.jgit.packaging/pom.xml clean install
+[INFO] Scanning for projects...
+...
+
+[~/src/jgit] $ cd ../egit
+
+[~/src/egit] $ mvn clean install
+[INFO] Scanning for projects...
+...
+
+[~/src/jgit] $ cd ../egit-github
+
+[~/src/egit-github] $ mvn clean install
+[INFO] Scanning for projects...
+...
+
+
The EGit build uses the JGit p2 repository to resolve jgit dependencies. For local builds the build assumes
+ that egit and jgit source trees are located under a common parent folder. If this is not the case the path
+ to the jgit p2 repository has to be injected via system property:
If you wan to build EGit for a specific Eclipse platform use the corresponding EGit target platform. For instance, to build for Eclipse 4.19 (2021-03), use the egit-4.19 target platform:
See the contents of bundle org.eclipse.egit.target for the available target platforms.
+
Upon a successful build, a p2 update site should be generated inside
+ egit/org.eclipse.egit.repository/target/repository. If not, make sure the target platform has been downloaded from within Eclipse (Windows>Preferences>Plug-in Development>Target Platform). The default target platform defined in the maven build is currently Eclipse 4.6 (Neon). If you skip setting the system property target-platform the target platform for Eclipse 4.6 will be used. EGit built with that target platform can run on any Eclipse >= 4.6. If you choose a higher target platform, the EGit produced may not run on Eclipses older than the target platform version.
+
A summary of the check results is written to the
+ target/dash/summary file. Dependencies which need to be vetted are marked as
+ restricted in this file.
+
+
It will fail the build if any dependency needs to be vetted:
+
+13:35:57 11:35:57 [INFO] --- license-tool-plugin:0.0.1-SNAPSHOT:license-check (license-check) @ egit-parent ---
+13:36:10 11:36:09 [INFO] Querying Eclipse Foundation for license data for 299 items.
+13:36:10 11:36:10 [INFO] Found 246 items.
+13:36:10 11:36:10 [INFO] License information could not be automatically verified for the following content:
+13:36:10 11:36:10 [INFO]
+13:36:10 11:36:10 [INFO] p2/orbit/p2.eclipse.feature/org.eclipse.emf.ecore/2.23.0.v20200630-0516
+13:36:10 11:36:10 [INFO]
+13:36:10 11:36:10 [INFO] This content is either not correctly mapped by the system, or requires review.
+13:36:10 11:36:10 [INFO] Summary file was written to: /home/jenkins/agent/workspace/egit.gerrit/repo/target/dash/summary
+13:36:10 11:36:10 [ERROR] Dependency license check failed. Some dependencies need to be vetted.
+
+
If that happens run the build again locally and provide a
+ gitlab token with scope "api" to automatically create review requests for the IP team:
+
Then wait until these requests have been approved.
+
You can set the option
+ dash.skip to skip the license check:
+
+
+mvn clean install -Ddash.skip
+
+
JGit Bazel Build
+
Since Gerrit is built using
+ Bazel a Bazel build was also implemented for JGit.
+ This simplifies working on Gerrit features which also require changes in JGit.
+
Note that the Bazel build does not yet support building JGit OSGi bundles, Eclipse features and the p2 repository which are required to install JGit in Eclipse.
+
Updating build version
+
use the tools/version.sh script to update the build version in all build files, e.g.
+
+./tools/version.sh --snapshot=6.2.0-SNAPSHOT
+
+
FindBugs and PMD
+
As part of the build, JGit and EGit run FindBugs and PMD to find issues.
The JGit projects have API tooling enabled. In order to use PDE API tools to get assistance with maintaining API changes and additions you need to set an API baseline:
+
+
download the p2 repository for the latest EGit release (which includes the JGit artifacts) to a local folder, e.g. ~/egit-releases/updates-4.9.1, find the p2 repository URLs
+ here and download the p2 repository of the latest minor release (service releases don't change API) using the corresponding link in the last column of that table
+
+
in Eclipse click "Preferences > Plug-In Development > API Baselines", click "Add Baseline..." and define a new baseline (e.g. egit-4.9.1) and point it to the local copy of the corresponding EGit p2 repository.
+
the API tools will then raise warning/errors for all detected problems and provide quick fixes helping to resolve these problems
EGit and JGit builds running on the JGit/EGit Jenkins instances are automatically signed
+ (using the
+ CBI eclipse-jarsigner-plugin) and published to the folder
+
To enable signing the maven profile eclipse-sign must be enabled via the option -P eclipse-sign in the respective build jobs running at
+ https://ci.eclipse.org/egit/
+
+
+
Creating a release
+
Use the tools/release.sh script to create a new release, e.g.
+
+./tools/release.sh v6.1.0.202203080745-r
+
+
+
release versions have 5 parts
major.minor.patch.buildTimestamp-qualifier
+
+
Traditionally we use local time in EST timezone for the buildTimestamp part of the version number since our build servers run in that timezone.
+
qualifier is
m1,m2, ...
for milestones,
rc1, rc2, ...
for release candidates and
r
for releases
+
+
+
We sign release tags, follow
+ Git Tools - Signing Your Work to set this up on your computer before creating the first release.
+
+
We create all milestones and releases on a dedicated stable branch to avoid interference with ongoing development on master. E.g. use the stable-6.1 branch for releasing 6.1.0 and subsequent patch releases like 6.1.1.
+
push the locally created release commit to eclipse.gerrithub.io for review
+
wait for the verification build to succeed and vote +1 on verified
+
review and submit the release change, then push the release tag to eclipse.gerrithub.io
+
the CI job will build the release version and deploy it to the Eclipse Maven repo at repo.eclipse.org
+
+
Release Notes
+
We create a release record for each release in the Eclipse project portal and publish release notes there.
Checkout the master branch and update the versions of jgit and egit to be contributed and the URL of the new version.
+
Milestones (version ends with -m1, -m2, -m3) and release candidates (version ends with -rc1) are deployed on the download server to egit/staging/<tag name>, the final release (version ends with -r) goes to egit/updates-<major version>.<minor version>[.<micro version>]. The releases on the download server can be browsed
+ here. Old releases are moved to the
+ archive server. Committers can trigger archiving
+ on this page.
+
+
All these builds are deployed to the corresponding release repositories on nexus.
+ Maven artefacts:
Final releases of jgit are also deployed to Maven central using Sonatype's OSS Nexus using some scripts located in the jgit repository under tools/maven-central.
+
Open simrel.aggr using the
+ CBI aggregator editor to edit these files.
+ This editor knows the structure of these files and can check their validity.
+
+
Push the change for review, review and submit it when the verification build job has voted +1 on verified.
+ Note that the simultaneous release repository only accepts fast-forward submits. This means if another project's change has been submitted you may have to rebase your change.
EGit and JGit projects are using
+ Gerrit Code Review for Git based patch submission and review.
+
+
Both projects accept contributions
+ only via Gerrit. Please do not send patches by e-mail. Although both projects are mirrored to Github, EGit and JGit also cannot accept Github pull requests.
+
+
+
+ Migration from git.eclipse.org to eclipse.gerrithub.io
+
+
On creation of a new account you must agree to the Contributor Agreement.
+
+
+
For login to GerritHub and GitHub you need a
+ GitHub account.
+
+
Associate your GitHub username with your Eclipse Account
+
+
Edit your
+ Eclipse account: login and click "Edit my account"
+
+
Set your GitHub username at the bottom of the page "Personal Information".
+
+
+
+
+
If you are a project committer you will get an invitation to join the project's GitHub organization
+
+
Modifications of Eclipse user accounts are replicated every 2-3 hours to GitHub, i.e. it could take a few hours to get this invitation
+
You can check in
+ GitHub settings if you are a member of the project's GitHub organization
+
+
+
+
+
Login to GerritHub and OAuth access to GitHub
+
+ GerritHub uses github.com for authentication. Permissions are granted to GitHub teams which are configured by Eclipse Foundation in the GitHub organisations
+ eclipse-egit and
+ eclipse-jgit.
+
+
For that it needs an GitHub OAuth scope granting read access to GerritHub:
Before your first contribution can be accepted, you need to electronically sign the
+ Eclipse Contributor Agreement(ECA). The ECA is good for three years. Find more information in the
+ ECA FAQ.
+
+
Minimally, all Git commits you contribute must have the following:
+
+
A single line summary in the comment field, followed by a more detailed descriptive paragraph;
+
Your credentials (email address) captured in the "Author" field
+
In addition ensure that the contributed code is licensed under the project license (EPL 2.0 for EGit and EDL 1.0 for JGit). This is done by putting a
+ copyright and license header into every new java file. See other existing project source files for the correct content.
+
+
+
With a valid ECA on file and the copyright and license header in place, we will be able to accept small patches (<1000 LoC) immediately. For larger patches, we will also have to create a contribution questionnaire for review by the Eclipse IP team, but this usually doesn't require additional actions from you.
+
To verify whether a contribution
+ requires a CQ, use one of the following git commands to check:
+
+
+
If it's committed: git log --shortstat
+
If not committed: git diff --stat
+
+
These commands tell you the number of insertions(+), and deletions(-). If the total number of lines inserted (e.g. added) in a contribution is greater than 1000 (yes, this includes comments) then a CQ is required.
Since git can have multiple remotes, you can define one to be used to refer to Gerrit to save typing. Inside a previously checked-out repository you can run:
Alternative approach: Add a new review remote in the Git Repositories view and select
+ Gerrit Configuration... in the context menu of the remote
+
+
From the appropriate Remotes node, create a New Remote and choose to Configure for Push. A unique name should be chosen,
+ review is suggested.
+
+
Changes committed to your local clone can now be pushed to Gerrit using the
+ review Remote. You will be prompted for your private key's passphrase if Eclipse is looking for it in the right place.
+
+
+
+
Instead of using the
+ Gerrit Configuration... wizard you can do the configuration steps manually:
+
+
Change the main URI or Add a Push URI (your Gerrit user name must be used here)
+
Make small commits, as small as reasonable. This makes them easy to review.
+
Each commit should have a commit message that explains very clearly what the commit sets out to achieve (unless this is abundantly clear from the code itself, which is basically only the case for trivial patches). Also, when you fix a bug then report which bug you fix. When there are deeper reasons for doing things the way the commit does, then explain these as well. This all is for the reviewers and yourself: the context of the commit is completely clear.
+
Do not mix concerns in commits: have a commit do a single thing. This makes them reviewable 'in isolation'. The purpose of the commit is clear and can be understood easily by the reviewers and yourself.
+
Do not break the build and tests for
+ any commit: this is very important for bug hunting.
+
+
Split your work into multiple smaller pieces of work (when possible) and implement each of these pieces in a series of commits.
+
A series of commits should work towards a 'feature' in a clear way and only 'enable' the feature in the last commit of the series.
+
In a series of commits first lay the groundwork and then build on that towards the feature.
+
+
Branches
+
When working with Gerrit, you can create local branches as you wish. When you are ready to push your changes, only the commits from your branch are pushed and are converted to reviews on Gerrit. The branch name itself is not visible on Gerrit.
+
Do not mix unrelated changes in branches: When you encounter a bug while working on something then create a new branch to fix the bug. Make sure you base it on the state of the remote branch that you want your fix to go to, e.g.
+ origin/master. If you have other changes that depend on the bug being fixed then rebase your work on that new branch.
+
+
Merge/Rebase: If you want your branch to include new commits from the remote repository, rebase your local branch. The reason for this is that in Gerrit, changes are reviewed one commit at a time, and modified until all review feedback has been addressed. This is different from a pull request workflow, where the combined changes are reviewed and feedback is addressed with additional commits.
These documents have links to other document. Browse through them without expecting to learn everything, just so you know roughly what areas and types of details they covert. When you are
+ not sure about how to write a piece of code or design the user interface, these are the two
+ first places to look at.
+
In addition there is all the worlds collective knowledge on how to write programs that shine.
+ When there is a conflict, the Eclipse guide lines and conventions take precedence.
+
Breaking the rules is ok if there is a very good reason and you can tell us what that reason
+ is.
+
In addition to these general rules, we regard performance high. If the EGit plugin is slow
+ in any way, that is a bug and should be reported and fixed. Java isn't slow, but there is a
+ lot of slow Java code.
+
Braces for one-line statements
+
Before 3.7.0 both in JGit and EGit, the preferred coding style was to leave off braces around statements with one line (with some exceptions to this rule), e.g.:
+
if (condition)
+ doSomething();
+
+
Starting with 3.7.0 braces are mandatory independently on the number of lines, without exceptions. The old code will remain as is, but the new changes should use the style below:
+
if (condition) {
+ doSomething();
+}
+
+
The main reason to the change was to simplify the review process, coding guidelines and to make them more consistent with Eclipse code formatter, see .
+
Removing trailing whitespace
+
In JGit and EGit we have enabled the save action "Remove trailing white spaces on all lines" for Java sources. This works except for empty comment lines, see .
+
As a workaround, use the following sequence of commands in the Java editor to trick the save action:
+
+
remove the offending trailing whitespace
+
the save action re-adds the trailing whitespace
+
CTRL-Z (CMD-Z on Mac) removes the re-added whitespace without triggering the save action again
+
+
Another workaround is to use
+ this little script from the command line to edit away trailing whitespace from changed lines.
+
final fields: marking fields as final forces them to be initialized in the constructor or at declaration
+
final static fields: clearly communicates the intent
+
where necessary to use final variables in inner anonymous classes
+
for simple local constants, e.g. final int MAX_RETRIES = 5;
+
+
Optional:
+
+
final classes: use when appropriate, e.g. API restriction
+
final methods: similar to final classes
+
+
Never:
+
+
local variables: it clutters the code, and makes the code less readable. When copying old code to new location, finals should be removed
+
method parameters: similar to local variables
+
+
Commit message guidelines
+
+
The commit message header should fit on one line, try to keep it shorter than 50 characters, at most 72. A blank line separates it from the body of the message.
+
The first line should be a clear and concise description about the change. It is recommended to start with the modified subsystem, followed by a colon and a description starting with capital letter and without period at the end. For example: UploadPack: Use reachability checker to validate non-advertised wants
+
In case of release engineering tasks without bugzilla entries the commit message header may look like "[findbugs] Fix warning XYZ for String constructor". The prefix in brackets is an indication why this comes without a corresponding bug.
+
Enter a newline before providing a more detailed description about the change.
+
Format the commit message to have newline characters after every 60-70 characters.
+ Commit message trailers (everything following the last blank line in the commit message) in
+ Key: value format are used for additional commit meta data. Some tools especially
+ Gerrit parse this meta data to provide additional functionality. You can use the
+ git interpret-trailers command to add or parse trailer lines at the end of commit messages.
+
+
If there is an associated bug number in Bugzilla about it, it should come as a
+ Bug: trailer right before Gerrit's Change-Id trailer (if available) or towards the end. Use exactly the capitalization "Bug", since the automatic linking mechanism to the bug database is case sensitive.
+
+
A
+ Gerrit Change-Id trailer is required for all changes pushed to Gerrit (to enable pushing new patchsets for the same change), it should be added in the format shown below. Use the
+ Gerrit commit message hook or EGit to add the
+ Change-Id.
+
+
A "Signed-off-by" can be added at the end of the commit message (see example below). It may be used to list all who modified (amended, rebased, cherry-picked) this change. This trailer
+ isn't mandatory anymore since March 2021.
+
+
+
+
+
CommitDialog: Fix the commit dialog to respect the workbench's selection
+
+Originally, the commit dialog would automatically check off all
+files in the dialog. This behaviour contradicts a user's expectation
+because their selection in the workbench is completely ignored. The
+code has been corrected to only preselect what the user has actually
+selected.
+
+Bug: 12345
+Change-Id: I71ac4844ab9d2f848352eba9252090c586b4146a
+Signed-off-by: Your Name <your.email@example.org>
+
+
License Header
+
All new code files, including test code, must have a license header.
When contributing patches, you have to update the copyright section at the beginning of the file if there is one. Please follow the style that is already present in the file. Some examples follow.
+
When there is only one copyright present (from a person or a company), like this:
+
Copyright (C) 2010, 2011 Some Name <some@example.org>
+
+
Change it like this (notice the updated year):
+
Copyright (C) 2010, YEAR Some Name <some@example.org> and others.
+
+
If there is a section Contributors: below the legal text and your change is more than a few lines, you can add your name there and optionally describe the change and link to a bug number. You can also start such a section if you contributed a significant change.
+
When there are multiple copyright entries there, add yours as a separate line. So, given this:
+
Copyright (C) 2010 Some Name <some@example.org>
+Copyright (C) 2011 Other Name <other@example.org>
+
+
Add another line:
+
Copyright (C) 2010 Some Name <some@example.org>
+Copyright (C) 2011 Other Name <other@example.org>
+Copyright (C) YEAR Your Name <you@example.org>
+
+
For new files, copy one of the existing headers and start the copyright section with your name.
+
Test before submitting
+
See the
+ Manual alpha testing section for some advice about how to test you work yourself.
+
+
+
Add automated tests for enhancements and bug fixes to ensure functional correctness and avoid regressions
+
Run all existing tests. It does not take very long.
+
Pay attention to the Java and Eclipse SDK baselines. EGit requires only Java 8 and Eclipse 4.4. You cannot use API's that are newer.
+
+
Sending patches by mail
+
EGit and JGit can accept patches only via Gerrit as per
+ Contributing_Patches.
+
Download and install the Eclipse package "Eclipse IDE for Eclipse Committers" or "Eclipse for RCP and RAP Developers" from here, if you don't already have it:
Go to the location of your egit repository, open the
+ tools directory and select
+ egit-developer-tools.p2f
+
+
Alternatively, if you only want to contribute to JGit, download the file from the above link and select it
+
+
+
All the items you don't already have should be selected automatically
+
Finish the wizard
+
Restart
+
+
Java Requirements
+
EGit and JGit have Java 7.0 and
+ Eclipse Platform 3.8.2 (Juno) as minimum requirements, so dependencies to newer Java and platform versions must be avoided.
+
+
We are using
+ API Tools Environment Descriptions (see changes for
+ JGit and
+ EGit) to facilitate detecting code which isn't working on Java 7. If you followed the instructions in the
+ Tools section above, the necessary descriptions should already be installed. Otherwise install
+ API Tools Environment Descriptions from the release train repository, see
+ Installing Execution Environment Descriptions.
+
+
Dependencies
+
After importing the EGit and JGit projects in Eclipse, they will not compile due to missing dependencies. There are a few ways to install these.
+
Option 1 (recommended): Use a Target Platform
+
+
+
+
This is the easiest method to install dependencies:
+
+
Open the
+ org.eclipse.egit.target project
+
+
Choose the
+ egit-<version>.target file matching the version of your Eclipse platform (e.g. 4.5 for Mars) and open it (this may take a while as it downloads the indexes of the p2 repositories the target platform refers to)
+
+
In the resulting editor, click on the
+ Set as Target Platform link at the top right (this may also take a while since it downloads the dependencies)
+
+
+
After that, the workspace should build cleanly. If not, try Project > Clean... > All. If this also doesn't help open Preferences > Plug-In Development > Target Platform,
+ select the checked target platform and click "Reload..." this will flush PDE's bundle cache and re-download the artifacts listed in the target platform.
+
There are different target definitions, one for each version of Eclipse that EGit supports. The one you select will be the one that is started if you want to try out a feature or bug fix.
+
You can always switch between them to test on different Eclipse versions. E.g. when you are developing some major UI functionality, you should try it with the oldest supported Eclipse release to make sure it doesn't depend on API that is only available in later versions.
+
Option 2: Install from Orbit P2 Repository
+
Install the dependencies from the Orbit p2 repository by importing the p2f file described
+ above.
+
+
If you want to try another Orbit p2 repository version on the
+ Orbit Downloads page, click on the newest recommended build (R-Build) and copy the update site link from "Orbit Build Repository" (it should end with /repository). Add this update site in Eclipse using "Install New Software..." and then find and select the following entries:
+
+
+
Java Mocking and Stubbing Framework
+
Args4j
+
Protocol Buffers
+
Apache Jakarta log4j Plug-in
+
Apache Commons Compress
+
XZ Data Compression
+
Hamcrest Library of Matchers
+
JavaEWAH
+
+
Running
+
Now that everything builds, the next step is to run an Eclipse instance with the EGit/JGit code of the workspace:
+
+
Right click on the
+ org.eclipse.egit.ui project
+
+
Debug As > Eclipse Application
+
+
This should create a new launch configuration and start a new nested Eclipse instance in debug mode. The created launch configuration can be edited, e.g. to change where the workspace of the nested Eclipse should be located.
+
The launch configuration can also be used in normal (non-debug) mode of course.
To deploy the site from JGit HIPP (Hudson) at
+ https://hudson.eclipse.org/jgit/ enable the Maven profile
+ build-server and add the Maven goals
+ site:site site:deploy.
+
+
If you uploaded the site for a new release update the index
+ /home/data/httpd/download.eclipse.org/jgit/docs/latest/apidocs/index.html
+ to refer to the new release's site.
+
EGit
+
The EGit project sources its documentation from the wiki and generates Eclipse help content from it (under the covers, we are using
+ Mylyn WikiText to make this possible). This significantly lowers the barrier for people to contribute documentation to the EGit project. To contribute documentation, simply modify the
+ EGit User's Guide. Have a look at the
+ Style Guidelines and
+ Eclipse Documentation Style Guide to get some guidance on how to write good documentation. More on that can be found
+ here.
+
+
The documentation is contained in the
+ org.eclipse.egit.doc plug-in. The
+ build-help.xml drives the generation of the help content. It is integrated into the maven build. The regular maven build of
+ org.eclipse.egit.doc
+
+
$ mvn clean install
+
+
will only package the help content committed to the egit repository. To update the help content by downloading the latest documentation from the wiki run
+
$ mvn clean install -Dupdate.egit.doc
+
+
Don't forget to check all the generated help pages and especially all hyperlinks and images before pushing the updated help to the code review system for inclusion into the continuous build.
+
The aim is to generate new documentation every month or so (or just on demand). If you're making big changes or want the documentation refreshed, please let us know on the egit-dev mailing list.
+ This works because Gerrit links the new commit to the prior change based upon the Change-Id footer in the commit message. (This is automatically generated by the commit-msg hook you installed above.) If you refuse to use the commit-msg hook, or don't have a Change-Id footer, you should read the Gerrit documentation on
+ change-id lines and
+ replacing changes.
+
+
+ Note: To be picked up by Gerrit, a Change-Id line must be in the bottom portion (last paragraph) of a commit message, and may be mixed together with the Signed-off-by, Acked-by, or other such footers. So if your Change-Id line is ignored it's probably not in the last paragraph :).
+
+
To compare bulk diffs using Git
+
Since each Gerrit review patchset actually commits its own tree, you can pull out the trees and compare them.
+
If you've got a large changeset, and you want to be able to do diffs between them via (command line) git instead of browsing on the web, then you can fetch the individual changes and then perform a diff. For example,
+ https://eclipse.gerrithub.io/c/eclipse-jgit/jgit/+/2 shows the 'download' section for each patchset. In this case, it looks like:
+
+
+
Patch Set 1 git pull origin refs/changes/02/2/1 (1d3331a91bd477d3f70cde9613576cf9688ac358)
+
Patch Set 2 git pull origin refs/changes/02/2/2 (13ab9a43d4d512963556a92e889b1204d32f8e68)
+
Patch Set 3 git pull origin refs/changes/02/2/3 (d14cc645655683ba3e30a35833fb2282142e898f)
+
Patch Set 4 git pull origin refs/changes/02/2/4 (43de8d385b614c72fd796e17da75d381f6e0cc25)
+
+
Performing a git pull will both get the bits and merge them into your tree, which won't do what you want for comparison. So, in order to get the bits (but not merge), you need to do a git fetch instead. Let's say we want to diff the last two patches against each other rather than reviewing the entire patchset again:
Git fetched data will stay around in your repository, but will be 'orphaned' if no references point to it. To clean up, you can run git gc or wait until this happens automatically.
+
Trigger Jenkins build for a change
+
We have build jobs
+ jgit.gerrit on
+ https://ci.eclipse.org/jgit/, and
+ egit.gerrit and
+ egit-github.gerrit on
+ https://ci.eclipse.org/egit/ which are triggered automatically when a new change or a new patchset for an existing change is pushed for review. These jobs will comment on the respective change when the build is started and when it's finished and vote on the change according to the build and test results.
+
+
Sometimes you may want to retrigger such a build e.g. because it may have failed due to some temporary problem.
+ Committers can manually trigger these jobs in the following way:
If you are not a committer and need to retrigger a build ask for that on the mailing list.
+
To approve a change
+
+
Click on Publish Comments
+
Vote with the radio buttons
+
+
To add a reviewer
+
Once you've pushed your commit to Gerrit for review, you can go to the web page (
+ https://eclipse.gerrithub.io) and see your changes. By clicking on the review, there's an option to add a reviewer by e-mail address; they'll then be sent a message indicating that they'd like your review on the item.
+
+
It's usually not necessary to add any reviewers, it should be reviewed by the committers sooner or later. If this hasn't happened, you can look for people that did changes in the same area and add them as reviewers. It's also ok to comment on a change to "bump" its visibility.
+
Code Review
+
The code review category indicates your opinion on the quality of the code, and how well it fits within the purpose of the existing surrounding code. A +2 vote from any committer is required before submission can occur. A -2 vote from any committer will block submission.
+
Submission Guidelines
+
We strive to use Gerrit to improve our understanding of the code base and improve quality.
+
In order to ensure a proper review happens, some simple guidelines should be followed:
+
+
vote 0/-1 for not-ready-to-submit (AKA WIP) own proposals, +1 otherwise;
+
If a changeset is not-ready-to-submit, please put [RFC] or [DRAFT] in the message to let people know
+
let non-trivial changes be in review for at least 24 hours
+
if you want your changeset reviewed by someone, please add them as a reviewer
+
+
Tips & Tricks
+
Class Loading Issues
+
If you encounter strange class loading issues during runtime (e.g. on UI test executions) the following might help:
+
Enable tracing in your launch configuration to get information how imported packages are resolved at runtime. Select the Tracing tab in your launch configuration, select "Enable tracing", select plug-in org.eclipse.osgi, select category resolver/wiring on the right side.
EGit and JGit are self hosted in
+ Gerrit. We use GerritHub which combines Gerrit for code review and GitHub for authentication, browsing and issue tracking. You can browse the repositories on their GitHub mirrors:
+
+ EGit,
+ JGit
+ or using the Gerrit gitiles plugin:
+
+ EGit,
+ JGit.
+
+
The first section below describes how to clone a repository and can be skipped if you have done this before.
+ The next section lists the repositories and their URLs.
+
Cloning
+
On the command line
+
+git clone <enter URL>
+
+
After that, import the projects into Eclipse using Import > Existing Projects into Workspace.
+ Moved to Mylyn:
+ EGit also provided tools for integrating with GitHub and Mylyn tasks.
+ They were moved to Mylyn in Eclipse 2023-06, see
+ mylyn.egit.
+
+
Development IDE Configuration
+
Download and install the Eclipse package "Eclipse IDE for Eclipse Committers" or "Eclipse for RCP and RAP Developers" from here, if you don't already have it:
Go to the location of your egit repository, open the
+ tools directory and select
+ egit-developer-tools.p2f
+
+
Alternatively, if you only want to contribute to JGit, download the file from the above link and select it
+
+
+
All the items you don't already have should be selected automatically
+
Finish the wizard
+
Restart
+
+
Java Requirements
+
Since 6.0 EGit and JGit have Java 11 and
+ Eclipse Platform 4.17 (2020-09) as minimum requirements, so dependencies to newer Java and platform versions must be avoided.
+
+
We are using
+ API Tools Environment Descriptions (see changes for
+ JGit and
+ EGit) to facilitate detecting code which isn't working on Java 11. If you followed the instructions in the
+ Tools section above, the necessary descriptions should already be installed. Otherwise install
+ API Tools Environment Descriptions from the release train repository, see
+ Installing Execution Environment Descriptions.
+
+
Dependencies
+
After importing the EGit and JGit projects in Eclipse, they will not compile due to missing dependencies.
+ Set a Target Platform to fix this
+
+
+
+
+
Open the
+ org.eclipse.egit.target project
+
+
Choose the
+ egit-<version>.target file matching the version of your Eclipse platform (e.g. 4.21 for 2021-09) and open it (this may take a while as it downloads the indexes of the p2 repositories the target platform refers to)
+
+
In the resulting editor, click on the
+ Set as Target Platform link at the top right (this may also take a while since it downloads the dependencies)
+
+
+
After that, the workspace should build cleanly. If not, try Project > Clean... > All. If this also doesn't help open Preferences > Plug-In Development > Target Platform,
+ select the checked target platform and click "Reload..." this will flush PDE's bundle cache and re-download the artifacts listed in the target platform.
+
There are different target definitions, one for each version of Eclipse that EGit supports. The one you select will be the one that is started if you want to try out a feature or bug fix.
+
You can always switch between them to test on different Eclipse versions. E.g. when you are developing some major UI functionality, you should try it with the oldest supported Eclipse release to make sure it doesn't depend on API that is only available in later versions.
EGit also provides tools for integrating with
+ PDE Build and Eclipse RelEng Tools. If you are an Eclipse developer using PDE Build and/or the Eclipse RelEng tools you might be interesting in the following as well. Otherwise you might just skip this section.
+
+
In addition to the
+ dependencies required for JGit and EGit you also need Eclipse PDE (>= 3.6.1) as well as org.eclipse.releng.tools in your target platform or checked out from Git in your workspaces.
+
Now that everything builds, the next step is to run an Eclipse instance with the EGit/JGit code of the workspace:
+
+
Right click on the
+ org.eclipse.egit.ui project
+
+
Debug As > Eclipse Application
+
+
This should create a new launch configuration and start a new nested Eclipse instance in debug mode. The created launch configuration can be edited, e.g. to change where the workspace of the nested Eclipse should be located.
+
The launch configuration can also be used in normal (non-debug) mode of course.
The JGit unit tests are executed during the maven build.
+ To run them from the Eclipse workbench use the launch configurations which are part of the sources of the test bundles'.
+
JGit HTTP Tests
+
The JGit HTTP tests in
+ org.eclipse.jgit.http.test rely on the Jetty web container.
+
+
To run these tests from Eclipse the Jetty feature is needed. Use one of the target platforms as described in
+ dependencies.
+
+
EGit Core Tests
+
The EGit Core tests are executed during the maven build for the bundle
+ org.eclipse.egit.core.test.
+
+
To run them from the Eclipse workbench use the launch configuration which is part of the sources of the test bundle
+ org.eclipse.egit.core.test.
+
+
EGit UI Tests
+
The EGit UI tests are using SWTBot, using the 'SWTBot for Eclipse Testing' feature.
+
You need to install at least "SWTBot for Eclipse Testing" and "SWTBot IDE Feature":
Do not touch the mouse or keyboard when the UI test is running since this may
+ disturb the UI test by e.g. moving the current focus to another window.
If you want to skip execution of UI tests (only execute core tests):
+
mvn -P skip-ui-tests clean install
+
+
If you want to skip all tests:
+
mvn clean install -Dmaven.test.skip=true
+
+
Auxilary testing tools
+
Any code, including testing code, does not always do what you expected it to. The most common failure is probably the failure to actually execute the part of the code you wanted to test. Code coverage tools like
+ EclEmma can easily visualize what part of the code is being executed.
+
in Repositories View on node "origin" click "Gerrit Configuration..." and select branch "master", then changes you push to upstream will end up in Gerrit for review and can be submitted there
in Repositories View on node "origin" click "Gerrit Configuration..." and select branch "master", then changes you push to upstream will end up in Gerrit for review and can be submitted there
This post is aimed at those who have been using Eclipse for a while, and probably have been using either the baked-in CVS or external SVN providers to store their source code. The content of the post is about Git: what it means to you, as an Eclipse user, and specifically, how it affects how you obtain or work with projects from Eclipse.org.
+
This post is not about the relative merits of Git over CVS/SVN, or of Git versus other distributed version control systems (DVCS) like Mercurial (Hg). Other sites can give those flavours if needed.
+
Once you understand the conceptual differences between CVS/SVN and Git, and then subsequently start to use Git, you may find it very difficult to go back. You should really start to experiment only if you think you're going to migrate in the near future, because using Git is like watching TV in colour: once you've discovered it, it's really difficult to go back to black & white.
+
+
☞
+ Once you start to use a DVCS, it's very unlikely you'll want to go back
+
+
+
Centralised version control systems
+
So, what do you need to know about Git? Well, both CVS and SVN are known as
+ centralised version control systems (CVCS). That is, there is one Master repository where people share code; everyone checks out their code (or branch) from that repository, and checks changes back in. For code that needs to be sent person-to-person (for example, for review, or as a way of contributing fixes), it is possible to create a
+ patch, which is a diff of your code against the given Master repository version (often HEAD, but sometimes a branch like Eclipse_35).
+
+
Two problems surface with a centralised version control system, although they aren't immediately obvious:
+
+
You need to be 'online' to perform actions, like diff or patch
+ [1].
+
+
Patches generated against a particular branch can become outdated fairly quickly as development of the snapshot-in-time branch moves on (e.g. when it is time to apply the patch, HEAD is different than it was when the patch was generated).
+
+
+ [1]
+ (A note on SVN: since SVN keeps the last-known checkout, it's possible to do a limited set of operations while disconnected from SVN, like diff from the last-known checkout. However, in general, you are prevented from doing many of the operations that are possible while connected.)
+
+
The first problem is rarely apparent for those working with Eclipse in a location at (or near) the repository itself. Those in the same continent will rarely experience delays due to global network variation; in addition, they tend to be employed in an organisation and sit at a desktop connected to wired networking for most of the day. Road warriors (those with laptops and who code from the local coffee shop) tend to operate in a more frequently disconnected mode, which limits repository functionality to when they are connected.
+
The second problem is simply an artifact of the way in which patches work. These are generally performed against HEAD (a snapshot in time) and then applied later (sometimes months or even
+ eight years later). Although they record the version of the file they were patched against, the patch itself is sensitive to big changes in the file, sometimes leading to the patch being inapplicable. Even relatively simple operations, like a file rename, can throw a well-formed CVCS patch out of the window.
+
+
Distributed Version Control Systems
+
Distributed Version Control Systems (DVCS) are a family of version control systems unlike those with which many are familiar. Two of the most popular are
+ Git and
+ Hg, although others (
+ Darcs,
+ Bazaar,
+ Bitkeeper, etc.) exist. In a DVCS each user has a complete copy of the repository, including its entire history. A user may potentially push changes to or pull changes from any other repository. Although policy may confer special status on one or more repositories, in principle every repository is a first-class citizen in the DVCS model. This stands in contrast to a centralised version control system, where every individual checks files into and out of an authoritative repository.
+
+
+
☞
+ Each user has a full copy of the repository
+
+
+
This initially sounds impossible, especially if you're used to centralised version control systems, and even more so if they involve pessimistic file-based locking. (If you do firmly want pessimistic locking, please stop reading here. Thanks.) Questions arise, like:
+
+
If everyone has a copy of the repository, don't all the forks diverge?
+
Where is the master repository kept?
+
Isn't the repository, like, really big?
+
No really, I like pessimistic locking.
+
+
Let's answer each one of these questions in turn. (If I missed your favourite question, then please feel free to add one in the comments.)
+
+
Yes, the forks
+ can diverge. But after all, open-source can diverge anyway. There's nothing stopping me from forking the dev.eclipse.org codebase, and publishing my own version of it called
+ Maclipse. The key thing here is that whilst forks are possible,
+ forking is not a bad thing in itself. After all, look at Linux and Android; originally, they shared a history, but are now different. XFree86 and X.Org
+ split over licensing issues. MySQL was forked to create
+ MariaDB, and so on. The key thing about forks is that the best survive. X.Org is now the default X client, whereas XFree86 was the default beforehand. The jury is still out on MySQL versus MariaDB. And although Maclipse has been downloaded literally tens of times, it hasn't caused a dent in Eclipse's growth.
+
+
☞
+ Forks happen
+
+
+
+
Do not try to bend the master repository – that's impossible. Instead, try only to realise the truth; there is no master repository. In fact, there's a veritable matrix of master repositories possible. Each repository can be considered a node in a graph; nodes in the graph can be connected to each other in any way. However, rather than an n-n set of links, the graph usually self-organises into a tree-like structure, logically associating with one point that acts as a funnel for everything else. In a sense, that's a master repository – everyone has already made the choice; now you have to understand it. Should an oracle intervene, a neo-master can be chosen.
+
+
☞
+ There is no master repository
+
+
+
+
Given that there is no master repository, it becomes clear that the repository must live in its entirety on each of the nodes in the DVCS. This usually leads to fears about the size of the repository, even taking into account that storage is cheap. A key point here is that DVCS repositories are usually far
+ smaller than their counterpart CVCS repositories, not least of the reasons for which being that everyone has to have a full repository in order to do any work. It's a natural consequence that they're smaller. However, they're smaller also because each repository contains far less scope than a CVCS repository. For example, most organisations will have one mammoth CVCS repository with several thousand top-level 'modules' (or 'projects') underneath. Because of the administrative overhead of 'creating a new repository', it is often easier to reuse the same one for everything. (SVN put some limits on how wide it could grow, which CVS tended not to have; but even so, the main
+ Apache SVN is over 900k revisions.) By contrast, a DVCS is usually nothing more than a directory with a few administrative files inside. It doesn't require administrator privileges or specific ports; in fact, since there's no central server to speak of, it doesn't even need to be shared by network protocols. As a result, a DVCS repository is much more granular – and easy to create – than a conventional CVCS repository. Firstly, it's always on your machine (there's no centralised server to configure) and secondly, all you need access to is a file system. So typically, a DVCS “repository” will often be at the level of an Eclipse project or project working set. For example, although the [
+ http://dev.eclipse.org/viewcvs/index.cgi/?root=RT_Project CVS RT repository] is shared by
+ Equinox and
+ ECF, a DVCS-based solution would almost certainly see the Equinox and ECF projects in their own repositories; perhaps, even breaking down further into (say) ECF-Doc and ECF-Bundles. Think of a DVCS repository as one or a few Eclipse projects instead of hundreds of projects together.
+
+
☞
+ DVCS repositories are much smaller, typically because they contain only a small number of highly-related projects
+
+
+
+
That's not a question. Look, if you want the benefits of a centralised DVCS with pessimistic locking and pessimistic users, then go look at
+ ClearCase.
+
+
☞
+ Friends don't let friends use ClearCase
+
+
+
+
+
How does it work?
+
There are two pieces of information that identify elements in a CVCS; a file's
+ name, and its
+ version (sometimes called
+ revision). In the case of CVS, each file has its own version stream (1.1, 1.2, 1.3), whilst in SVN, each changeset has a 'repository revision' number. Tags (or branches) are symbolic identifiers which may be attached to any specific set of files or repository revision, and are mostly for human consumption (e.g. HEAD, trunk, ECLIPSE_35).
+
+
This doesn't work in a DVCS. Because there is no central repository, there is no central repository version number (either for the repository as a whole, or for individual files).
+
Instead, a DVCS operates at the level of a
+ changeset. Logically, a repository is made up of an initial (empty) state, followed by many changesets. (A changeset is merely a change to a set of files; if you think 'patch' from CVS or SVN, you're not far off.)
+
+
Identifying a changeset is much harder. We can't use a (global) revision number, because that concept isn't used. Instead, a changeset is represented as a hash of its contents. For example, given the changeset:
+
--- a/README.txt
++++ b/README.txt
+@@ -1 +1 @@
+-SVN is great
++Git is great
+
+
we can create a 'hash' using (for example) md5, to generate the string 0878a8189e6a3ae1ded86d9e9c7cbe3f. When referring to our change with others, we can use this hash to identify the change in question.
+
+
☞
+ Changesets are identified by a hash of their contents
+
+
+
Clearly, though, this doesn't work on its own. What happens if we do the same change later on? It would have the same change, and we don't want the same hash value.
+
What happens is that a changeset contains two things; the change itself, and a back-pointer to the previous changeset. In other words, we end up with something like:
+
previous: 48b2179994d494485b79504e8b5a6b23ce24a026
+--- a/README.txt
++++ b/README.txt
+@@ -1 +1 @@
+-SVN is great
++Git is great
+
+
+
☞
+ Changesets (recursively) contain pointers to the previous changeset
+
+
+
Now, if we were to have the same change again, the
+ previous value would be different, so we'd get a different hash value. We could set up an argument:
+
+
previous: 48b2179994d494485b79504e8b5a6b23ce24a026
+--- a/README.txt
++++ b/README.txt
+@@ -1 +1 @@
+-SVN is great
++Git is great
+
+
previous: 8cafc7ecd01d86977d2af254fc400cee
+--- a/README.txt
++++ b/README.txt
+@@ -1 +1 @@
+-Git is great
++SVN is great
+
+
previous: cba3ef5b2d1101c2ac44846dc4cdc6f4
+--- a/README.txt
++++ b/README.txt
+@@ -1 +1 @@
+-Git is great
++SVN is great
+
+
Each time, the value of the changeset includes a pointer to what comes before, so the hash is continually changing.
+
+ Note: Rather than using md5, as shown here, most DVCS (including Git) use an sha1 hash instead. Also, the exact way that the prior elements in the tree are stored, and their relationships, isn't accurately portrayed above; however, it gives sufficiently well the idea of how they are organised.
+
+
+
☞
+ Git changesets are identified by an SHA-1 hash
+
+
+
Changesets and branches
+
Given that a changeset is a long value like 48b2179994d494485b79504e8b5a6b23ce24a026, it can be unfriendly to use. Fortunately, there are a couple of ways around this. Git, like other DVCSs, allow you to use an abbreviated form of the changeset, provided that it's unique in the repository. For small repositories, this means that you can refer to changesets by really short values, like 48b21 or even 48. Conventionally, developers often use 6 digits of the hash – but large projects (like the Linux kernel) tend to have to use slightly larger references in order to have uniqueness.
+
+
☞
+ Git hashes can be shortened to any unique prefix
+
+
+
The current version of your repository is simply a pointer to the end of the tree. For this reason, it's often referred to as a
+ tip, but HEAD is the symbolic identifier for what the current repository is pointing to. Similarly, any branch can be referred to by its changeset id, which includes that and all prior changes. The default branch is usually called
+ main.
+
+
+
☞
+ The default 'trunk' is called 'main' in Git
+
+
☞
+ The tip of the current branch is referred to as 'HEAD'
+
+
+
As a direct corollary to this, creating branches in a DVCS is fast. All that happens is that the repository on disk is updated to point to a different element in the (already physically present) tree, and you're done. Furthermore, it's trivial to ping-pong between different branches on the same repository that may contain different states and evolve independently.
+
+
☞
+ Creating, and switching between, branches is fast
+
+
+
Because branching is so fast, branches get used for things that a user of a CVCS wouldn't normally use branching for. For example, each bug in Bugzilla could have a new branch associated with it; if a couple of independent features are being worked on concurrently, they'd get their own branch; if you needed to drop back to do maintenance work on an ECLIPSE_35 branch, then you'd switch to a branch for that as well. Branches get created at least as frequently as
+ changesets might in CVS, if not more so.
+
+
+
☞
+ Create a new branch for each Bugzilla or feature item that you work on
+
+
☞
+ Think of branches as throwaway changesets
+
+
+
Merging
+
With great power comes great flexibility, but ultimately, you want to get your changes into some kind of merged stream (like
+ main). One of the fears of unconstrained branching is that of unconstrained merge pains later on. SVN makes this slightly less difficult than CVS, but unless you merge to HEAD frequently, you can easily get lost – particularly when refactorings start happening.
+
+
+
☞
+ It's painful to merge in a CVCS; therefore branches tend not to happen
+
+
+
Fortunately, DVCSs are all about merging. Given that each node in the changeset tree contains a pointer to its previous node (and transitively, to the beginning of time), it's much more powerful than the standard flat CVCS diff. In other words, not only do you know what changes need to be made, but also
+ at what point in history they need to be made. So, if you have a changeset that renames a file, and then merge in a changeset that points to the file as it was before it was renamed, a CVCS will just fall over; but a DVCS will be able to apply the change
+ before the rename occurred, and then play forward the changes.
+
+
Merges are just the weaving together of two (or more) local branches into one. The
+ git merge documentation has some graphical examples of this; but basically, it's just like any other merge you've seen. However, unlike CVCS, you don't have to specify anything about where you're merging from and to; the trees automatically know what their split point was in the past, and can work it out from there.
+
+
+
☞
+ Merging in a DVCS like Git is trivial
+
+
+
Pulling and pushing
+
So far, we've not talked much about the distributed nature of DVCS. Implicitly, though, the changes and ideas above are all to support distribution.
+
Given that a DVCS tree is merely a pointer to a branch (which transitively contains a long list of previous branches), and that each one of these nodes is identified by its hash, then you and I can share the same revision identifiers for common parts of our tree. There are three cases to consider for comparing our two trees:
+
+
Your tip is an ancestor of my tip
+
My tip is an ancestor of your tip
+
Neither of our tips are direct ancestors; however, we both share a common ancestor
+
+
The first two cases are trivial; if we synchronise trees, they just become a fast-forward merge. In fact, if that occurs, chances are you won't know who is ahead of the other; it will just happen.
+
The last case is only slightly more tricky; a common ancestor must be found; say, 746d6c. Then I send changes between my tip and 746d6c, and you send changes between your tip and 746d6c. That way, we both end up with the same contents on our repositories.
+
Changes flow between repositories by
+ push and
+ pull operations. In essence, it doesn't matter whether I push my changes to you, or you pull my changes from me; the net result is the same. However, in the case of Eclipse.org infrastructure, it's likely that a central Git repository will be writable only by Eclipse committers. Thus, if I contribute a fix, I can ask a committer to pull the fix from my repository, and then they (after reviewing, and optionally rebasing) can push the fix to the Eclipse.org repository.
+
+
The best part of a DVCS is that it takes care of all the paperwork for you. You don't need to use SVN-like 314:321 tags to remind you where you branched from; you don't even have to worry if you haven't updated recently. It all just works.
+
+
☞
+ Pulling and pushing in a DVCS like Git is trivial
+
+
+
Cloning and remotes
+
Where you can push (or pull) to is configured on a per (local) repository basis. Typically, if you clone an existing project, then a
+ remote name called
+ origin is automatically set up for you. For example, if you wanted to get hold of
+ org.eclipse.babel.server.git, then you could do:
+
We can then keep up-to-date with what's happening on the remote server by executing a pull from the remote:
+
git pull origin
+
+
...but we're not limited to one repository. Let's say we wanted to create a separate copy on
+ GitHub for easy forking; we can do that by adding another remote Git URL and then pushing to that:
+
We can now use git push and git pull to move items between the two git repositories. By default, they both refer to the special-named
+ origin, but you can specify whatever remote to talk to on the command line.
+
+
+
☞
+ Origin is the name of the default remote, but you can have many remotes per repository.
+
+
+
Initialising, committing and branching
+
To create a new Git repository, the git init command is used. This creates an empty repository in the current directory. They can, but often don't, end with .git – typically it's only repositories pushed to remote servers that use the .git extension. As noted above, a Git repository should ideally hold only one or a few highly related/coupled projects.
+
+
☞
+ 'git init' creates a fresh repository in the current directory
+
+
+
Git allows you to commit files, much like any other VCS. Each commit may be a single file, or many files; and a message goes along with it. Unlike other VCS, Git has a separate concept of an
+ index, which is a set of files that would be committed. You can think of it as an active changeset; as you're working on multiple files, you want only some changes to be committed as a unit. These files get git added to the index first, then git committed subsequently. (If you don't like this behaviour, there's a git commit -a option, which performs as CVS or SVN would.)
+
+
+
☞
+ 'git add' is used to add files and track changes to files
+
+
☞
+ 'git commit' is used to commit tracked files
+
+
+
To create branches, you can use git branch (which creates, but does not switch to, the new branch) and git checkout (which switches to the new branch). A shorthand for new branches is git checkout -b, which creates-and-switches to a branch. At any point, git branch shows you a list of branches and marks the current one with a * next to the name.
+
+
☞
+ 'git branch' is used to create and list branches
+
+
☞
+ 'git checkout' is used to switch branches
+
+
☞
+ 'git checkout -b' is used to create and then switch branches
+
+
+
Worked example
+
Here's a transcript of working with setting up an initial repository, then copying data to and from a 'remote' repository, albeit in a different directory on the same system. The instructions are for a Unix-like environment (e.g. Cygwin on Windows).
+
$ mkdir /tmp/example
+$ cd /tmp/example
+$ git init
+Initialized empty Git repository in /tmp/example/.git/
+$ echo "Hello, world" > README.txt
+$ git commit # Won't commit files by default
+# On branch main
+#
+# Initial commit
+#
+# Untracked files:
+# (use "git add <file>..." to include in what will be committed)
+#
+# README.txt
+nothing added to commit but untracked files present (use "git add" to track)
+$ git add README.txt # Similar to Team -> Add to Version Control
+$ # git commit # Would prompt for message
+$ git commit -m "Added README.txt"
+[main (root-commit) 0dd1f35] Added README.txt
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ create mode 100644 README.txt
+$ echo "Hello, solar system" > README.txt
+$ git commit
+# On branch main
+# Changed but not updated:
+# (use "git add <file>..." to update what will be committed)
+# (use "git checkout -- <file>..." to discard changes in working directory)
+#
+# modified: README.txt
+#
+no changes added to commit (use "git add" and/or "git commit -a")
+$ git commit -a -m "Updated README.txt"
+[main 9b1939a] Updated README.txt
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+$ git log --graph --oneline # Shows graph nodes (not much here) and change info
+* 9b1939a Updated README.txt
+* 0dd1f35 Added README.txt
+$ git checkout -b french 0dd1f35 # create and switch to a new branch 'french'
+Switched to a new branch 'french'
+$ cat README.txt
+Hello, world
+$ echo "Bonjour, tout le monde" > README.txt
+$ git add README.txt # or commit -a
+$ git commit -m "Ajouté README.txt"
+[french 66a644c] Ajouté README.txt
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+$ git log --graph --oneline
+* 66a644c Ajouté README.txt
+* 0dd1f35 Added README.txt
+$ git checkout -b web 0dd1f35 # Create and checkout a branch 'web' from initial commit
+$ echo '<a href="http://git.eclipse.org">git.eclipse.org</a>' > index.html
+$ git add index.html
+$ git commit -m "Added homepage"
+[web d47e30c] Added homepage
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ create mode 100644 index.html
+$ git checkout main
+$ git branch # See what branches we've got
+ french
+* main
+ web
+$ git merge web # pull 'web' into current branch 'main'
+Merge made by recursive.
+ index.html | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ create mode 100644 index.html
+$ git checkout french # Switch to 'french' branch
+Switched to branch 'french'
+$ git merge web # And merge in the same
+Merge made by recursive.
+ index.html | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+ create mode 100644 index.html
+$ git log --graph --oneline
+* e974231 Merge branch 'web' into french
+|\
+| * d47e30c Added homepage
+* | 66a644c Ajouté README.txt
+|/
+* 0dd1f35 Added README.txt
+$ git checkout main
+$ git log --graph --oneline
+* e3de4de Merge branch 'web'
+|\
+| * d47e30c Added homepage
+* | 9b1939a Updated README.txt
+|/
+* 0dd1f35 Added README.txt
+$ (mkdir /tmp/other;cd /tmp/other;git init) # Could do this in other process
+$ (cd /tmp/other;git config --bool core.bare true) # Need to tell git that /tmp/other is a bare repository so we can "push" to it
+Initialized empty Git repository in /tmp/other/.git/
+$ git remote add other /tmp/other # could be a URL over http/git
+$ git push other main # push branch 'main' to remote repository 'other'
+Counting objects: 11, done.
+Delta compression using up to 2 threads.
+Compressing objects: 100% (7/7), done.
+Writing objects: 100% (11/11), 981 bytes, done.
+Total 11 (delta 1), reused 0 (delta 0)
+Unpacking objects: 100% (11/11), done.
+To /tmp/other
+ * [new branch] main -> main
+$ git push --all other # Push all branches to 'other'
+Counting objects: 8, done.
+Delta compression using up to 2 threads.
+Compressing objects: 100% (3/3), done.
+Writing objects: 100% (5/5), 567 bytes, done.
+Total 5 (delta 0), reused 0 (delta 0)
+Unpacking objects: 100% (5/5), done.
+To /tmp/other
+ * [new branch] french -> french
+ * [new branch] web -> web
+$ cd /tmp/other # Switch to 'other' repository. git commands now apply to this repository
+$ git config --bool core.bare false # need to allow this repository to have checked out files
+$ ls # Nothing to be seen, but it's there
+$ git branch
+ french
+* main
+ web
+$ git checkout web # Get the contents of the 'web' branch in other
+$ ls
+README.txt index.html
+$ echo '<h1>Git rocks!</h1>' >> index.html
+$ git commit -a -m "Added Git Rocks!"
+[web 510621a] Added Git Rocks
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+$ cd /tmp/example # Back to first repo. git commands now apply to 'example' repository
+$ git pull other web # Pull changes from 'other' repo 'web' branch
+remote: Counting objects: 5, done.
+remote: Compressing objects: 100% (3/3), done.
+remote: Total 3 (delta 0), reused 0 (delta 0)
+Unpacking objects: 100% (3/3), done.
+From /tmp/other
+ * branch web -> FETCH_HEAD
+Merge made by recursive.
+ index.html | 1 +
+ 1 files changed, 1 insertions(+), 0 deletions(-)
+$ git log --graph --oneline
+* 146932f Merge branch 'web' of /tmp/other
+|\
+| * 510621a Added Git Rocks
+* | e3de4de Merge branch 'web'
+|\ \
+| |/
+| * d47e30c Added homepage
+* | 9b1939a Updated README.txt
+|/
+* 0dd1f35 Added README.txt
+
+
Rebasing and fast-forwarding
+
Often, you'll work on a branch for a while and then want to commit it to the repository. You can do this at any point, but it's considered good practice to
+ rebase your local branch before doing so. For example, you can end up with multiple branches in the log (with git log --graph --oneline):
+
+
* f0fde4e Merge change I11dc6200
+|\
+| * 86dfb92 Mark the next version as 0.6
+* | 0c8c04d Merge change I908e4c77
+|\ \
+| |/
+|/|
+| * 843dc8f Add support for logAllRefUpdates configuration parameter
+* | 74ba6fc Remove TODO file and move to bugzilla
+* | ba7c6e8 Fix SUBMITTING_PATCHES to follow the Eclipse IP process
+* | c5e8589 Fix tabs-to-spaces in SUBMITTING_PATCHES
+* | 677ca7b Update SUBMITTING_PATCHES to point to Contributor Guide
+* | 8847865 Document protected members of RevObjectList
+* | a0a0ce8 Make it possible to clear a PlotCommitList
+* | 4a3870f Include description for missing bundle prereqs
+|/
+* 144b16d Cleanup MANIFEST.MF in JGit
+
+
What happened here was that two branches split off from change 144b16d, ultimately driving another branch at 74ba6fc and a few merges (at 0c8c04d and f0fde4e). (You can see a similar effect in
+ Google Code's Hg view of Wave Protocol.) Ultimately, whilst the DVCS can handle these long-running branches and subsequent merges, humans tend to prefer to see fewer branches in the final repository.
+
+
A
+ fast-forward merge (in Git terms) is one which doesn't need any kind of merge operation. This usually happens when you are moving from an older branch to a newer branch on the same timeline; such as when updating to a newer version from a remote repository. These are essentially just moving the HEAD pointer further down the branch.
+
+
A
+ rebase is uprooting the branch from the original commit, and re-writing history as if it had been done from the current point in time. For example, in the above Git trace, 1441b16d to 843dc8f to 0c8c04d was only one commit off the main tree. Had the change been rebased on 74ba6fc, then we would have only seen a single timeline across those commits. It's generally considered good practice to rebase changes prior to pushing to a remote tree to avoid these kind of fan-outs, but it's not necessary to do so. Furthermore, the rebase operation changes the sha1 hashes of your tree, which can affect those who have forked your repository. Best practice is to frequently rebase your changes in your own local repository, but once they've been made public (by pushing to a shared repository) to avoid rebasing further.
+
+
+
☞
+ Rebasing replants your tree; but do it on local branches only
+
Git is built on a few simple and very powerful ideas. Knowing them helps to understand more easily how git works.
+
Repository
+
The Repository or Object Database stores all objects which make up the history of the project. All objects in this database are identified through a secure 20 byte
+ SHA-1 hash of the object content. This has several advantages:
+
+
+
comparing two objects boils down to comparing two SHA-1 hashes.
+
since object names are computed from the object content in the same way in every git repository, the same object will be stored under the same name in all repositories which happen to contain this object.
+
an object never changes once created (obvious since changing the contents means a new hash must be calculated and a new name assigned).
+
repository corruption can easily be detected by checking if the SHA-1 object name still is the secure hash of the object's content.
+
+
Git has four object types :
+
+
A
+ Blob object stores file content.
+
+
A
+ Tree object stores the directory structure and contains
+ Blob objects and other
+ Tree objects together with their file system names and modes.
+
+
A
+ Commit object represents a snapshot of the directory structure at the time of the commit and has a link to its predecessor
+ Commit object which form an acyclic graph of the repository revisions forming the repository history.
+
+
A
+ Tag object is a symbolic named link to another repository object which contains the object's name and type. Optionally, it also contains information about who created the tag and other signing information.
+
+
+
The object database is stored in the .git/objects directory. Objects are either stored as loose objects or in a single-file packed format for efficient storage and transport.
+
+ Trust
+
+
Git provides a built-in trust chain through secure SHA-1 hashes which allows it to verify if objects obtained from a (potentially untrusted) source are correct and have not been modified since they have been created.
+
If you get the signed tag for e.g. a project release which you can verify with e.g. the tagger's (the project lead's) public signing key, git ensures that the chain of trust covers the following:
+
+
the signed tag identifies a commit object.
+
the commit object represents exactly one project revision including its content and history.
+
the commit object contains the tree of blob objects and other tree objects representing the directory structure of the project revision.
+
the blob objects contain the file contents for this project revision.
+
+
All of the involved object names can be checked for consistency using the SHA-1 algorithm to ensure the correctness of the project revision and that the entire history can be trusted.
+
Index
+
The
+ Git Index is a binary file stored in the .git/index directory containing a sorted list of file names, file modes, and file meta data used to efficiently detect file modifications. It also contains the SHA-1 object names of blob objects.
+
+
It has the following important properties:
+
+
The index contains all information necessary to generate a single uniquely defined tree object. E.g. a commit operation generates this tree, stores it in the object database and associates it with the commit.
+
The index enables fast comparison of the tree it defines with the current working directory. This is achieved by storing additional meta data about the involved files in the index data.
+
The index can efficiently store information about merge conflicts between the trees involved in the merge so that for each pathname there is enough information about the involved trees to enable a three-way merge.
+
+
Branches
+
A branch in Git is a named reference to a commit. There are two types of branches, namely "Local" and "Remote Tracking" branches which serve different purposes.
+
Local Branches
+
Whenever a change to a (local) Repository is committed, a new commit object is created. Without any other means, it would be very difficult to keep track of the changes in the Repository, in particular when other commits are added to the Repository, for example due to an update from the remote Repository or when checking out another commit.
+
A local branch helps with this task by providing a (local) name by which the "current" commit can be found. When changes are committed to the local repository, the branch is automatically updated to point to the newly created commit.
+
In addition, it is possible to add a so-called upstream configuration to a local branch which can be helpful when synchronizing with a remote repository.
+
Remote Tracking Branches
+
Remote tracking branches are created automatically when cloning and fetching from remote repositories. A remote tracking branch in the local repository always corresponds to a (local) branch in the remote repository. The name of such a branch follows certain conventions.
+
The remote tracking branch points to the same commit as the corresponding branch in the remote repository (at the time of the clone/fetch).
+
Remote tracking branches can be used for automated creation of upstream configuration for local branches.
+
Working Directory
+
The working directory is the directory used to modify files for the next commit. By default it is located one level above the .git directory. Making a new commit typically involves the following steps:
+
+
Check out the branch the new commit shall be based on. This changes the working directory so that it reflects the
+ HEAD revision of the branch.
+
+
Do modifications in the working directory.
+
Tell git about these modifications (add modified files). This transfers the modified file contents into the object database and prepares the tree to be committed in the index.
+
Commit the tree prepared in the index into the object database.
+
The result is a new commit object and the
+ HEAD of the current branch moves to the new commit.
+
+
+
Recording Changes in the Repository
+
You start from a fresh checkout of a branch of a local repository. You want to do some changes and record snapshots of these changes in the repository whenever you reach a state you want to record.
+
Each file in the working directory can either be
+ tracked or
+ untracked:
+
+
+
+ Tracked files are those which were in the last snapshot or files which have been newly staged into the
+ index. They can be
+ unmodified,
+ modified, or
+ staged.
+
+
+ Untracked files are all other files (they were not in the last snapshot and have not yet been added to the
+ index).
+
+
+
When you first clone a repository, all files in the working directory will be
+ tracked and
+ unmodified since they have been freshly checked out and you haven't started editing them yet.
+
+
As you edit files, git will recognize they are
+ modified with respect to the last commit. You
+ stage the modified files into the index and then
+ commit the staged changes. The cycle can then repeat.
+