Skip to main content
Jump to: navigation, search


< ETrice‎ | Development
Revision as of 01:57, 21 April 2011 by (Talk | contribs) (pulling for remote tracking branches)


Getting Started

GIT at Eclipse

Clone eTrice Repository


IMPORTANT: execute in shell or git shell:

  • git config --global <your email address>
  • git config --global "<your user name>"

pull/push (only for committers)

  • ssh: git clone ssh://<dein commiter name>
  • https: git clone https://<dein commiter name>

only pull

Use EGit

  • create empty workspace
  • open view "Git Repositories" or perspective "Git Repository Exploring"
  • add repository path of your local git repository you cloned before
  • contextmenu on repository: "Import Projects..."
  • Next >
  • Select All + Finish

Create a Patch via Git Gui

  • open the Git Gui from your windows menu
  • open your "local Git Repositoriy"
  • from the main menu select "Projektarchiv" => "Historie von >>master<< darstellen"
  • in the new window the latest master version must be selected (blue)
  • right click on "lokale Änderungen"
  • in the contextmenu select "Patch erstellen"

Checkout a previous revision

Inspect the log and determine the commit id you want to change to. Then git checkout this:

 $ git checkout 2eb90f4643fd425f77de2b88753a86416cda0166
 Note: checking out '2eb90f4643fd425f77de2b88753a86416cda0166'.
You are in 'detached HEAD' state. You can look around, make experimental changes and commit them, and you can discard any commits you make in this state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may do so (now or later) by using -b with the checkout command again. Example:
git checkout -b new_branch_name
HEAD is now at 2eb90f4... ui.structure: during creation take position as midpoint of new interface item. Adjusted PopulateDiagramCommand accordingly.

working with branches

creating a local branch

pushing a local branch

creating a remote tracking branch

pulling for remote tracking branches

If you often merge with the same branch, you may want to use something like the following in your configuration file:

   [branch "before_indigo"]
   remote = <nickname>
   merge = <remote-ref>
   [remote "<nickname>"]
   url = <url>
   fetch = <refspec>

With EGit the configuration can be accesses from the Git Repositories View context menu > Open Properties View The Properties View displays the current configuration and offers an Edit button in the upper left corner.

Here is an example of a pull configuration for a remote tracking branch:

Using the eTrice github clone

According to Eclipse projects with git repositories (and correct metadata set) are mirrored to github.

And so is eTrice:

Here are some slides explaining how github is accessed using EGit:

Any github user can fork an existing github repository. This facilitates collaborating with contributors which have no commit rights.

TODO: typical workflow...

Copyright © Eclipse Foundation, Inc. All Rights Reserved.