You are not logged in. Click here to log in.

codeBeamer ALM

Search In Project

Search inClear

Tags:  eGit Git

Create a Git project under Eclipse

We assume a project is created in codebeamer with a new bug added to a tracker.

Open your Eclipse IDE with EGit installed in it, and go to select File / Import menu item, and look for Git > Git Repository:

Figure: Create a New Project in Eclipse IDE

Click Next and setup ssh authentication data according to your settings:

Figure: Set Authentication Data to Clone codeBeamer Managed Git Repository

Click Next and then select which branch you would like to clone from (first time there is only 1 of them):

Figure: Select Branch(es) to Clone

Click Next to start procedure on last page a new project is generated in your workplace using Git.

Figure: Finalize Settings for Clone

Commit a Change to a Project

Now it is time do your changes and fix the issue in the source code. Changed but uncommitted files are marked by a small white star icon. When your change is ready, commit it to your local clone. You don't need a connection with the codeBeamer server: everything is done on the developer's machine. In the context menu (Package Explorer View), select the changed item or the parent of more changes, then select Team >Commit (right mouse button):

Figure: Commit Changes to Local Project (local)

To correctly identify yourself as an author/committer set your codeBeamer account data to the appropriate field in 'username <email@address>' format. Unfortunately this cannot be set permanently by EGit but it can be set easily from a command line (see more information here)

Don't forget to associate your commit with an issue ID. Just add the issue-id to the beginning of the commit message like: #1234, #5678 (1 or more issue-ids). The codeBeamer project settings determine whether a commit is allowed or not when a valid issue ID isn't assigned.  For more information see Tracing Source Code Changes to Requirements, Task and Bugs

More changes can be committed to the project in the same way.

Push Changes to codeBeamer

When you're ready to share your work with other team-mates, local changes have to be pushed to codeBeamer server. Select Team >Push To... item from the context menu on project root and select the push target :

Figure: Select codeBeamer Managed Git Repository Target to Push Changes

Click Next and select Source Ref to select what you would like to push. Destination Ref selector will be automatically set to the most proper remote ref, but you can override it. Click on Add spec which will add the defined ref-spec to the list below:

Figure: Select Refs for Push

You will get a color coded explanation showing the result of the operation. Always read it carefully (tooltip also), because it might contain information about failure as well (e.g. a hook is rejected push because of unallowed author).

Figure: Result Screen of a Successful Push

After a successful push your changes are shared on codeBeamer, and the issue-association(s) is(are) made with the commit.

Create and Push Branch(es) to codeBeamer

Now create your own branch and share it with others (through codeBeamer).  Select Team >Branch... and then click the New branch button, enter a name and click done. To reflect your changes in the Eclipse GUI start a Checkout before leaving the branch dialog. No connection is needed with the codeBeamer server:everything is performed on the developer's machine. Make the changes on your branch; fix the issue in the source code etc. and commit your changes the same way as before (see above). These changes and the branch must be pushed to codeBeamer:

Figure: Push a New Branch and Changes to codeBeamer Managed Git Repository

You will get a color coded explanation about the result of the operation. This is different from the result shown before in that the branch is now my-devel.
Always check this dialog carefully (look at the tooltip too), because it might contain information about failure as well (e.g. a hook is rejected push because of a disallowed author):

Figure: Failure Screen of a Push