{"id":628,"date":"2011-06-21T09:56:43","date_gmt":"2011-06-21T16:56:43","guid":{"rendered":"https:\/\/blogs.plm.automation.siemens.com\/t5\/Polarion-Blog\/Get-Going-with-Git\/ba-p\/380675"},"modified":"2026-03-26T05:29:05","modified_gmt":"2026-03-26T09:29:05","slug":"get-going-with-git","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/polarion\/get-going-with-git\/","title":{"rendered":"Get Going with Git"},"content":{"rendered":"<p><A href=\"http:\/\/git-scm.com\/\" rel=\"nofollow noopener noreferrer\"><IMG class=\"alignleft size-full wp-image-1428\" title=\"Go to Git\" src=\"http:\/\/community.plm.automation.siemens.com\/legacyfs\/online\/siemensplm_blogs\/2011\/05\/git.jpg\" alt=\"Git\" width=\"250\" height=\"250\" \/><\/A>By default, Polarion installs and uses a Subversion repository. But what if you have some codebase in an external repository&#8230; a <STRONG>Git<\/STRONG> repo, for example? And if you&#8217;re new to Git, how do you set up a repository? This post provides a few practical tips to help you get Git, and once you&#8217;ve got Git, get going \ud83d\ude42 so you can link Git revisions to Polarion Work Items.<\/p>\n<p><!--more--><\/p>\n<p>The Git project is hosted on: <A href=\"http:\/\/git-scm.com\/\" rel=\"nofollow noopener noreferrer\">http:\/\/git-scm.com\/<\/A> There are <STRONG>download<\/STRONG> links for <STRONG>Windows<\/STRONG> and <STRONG>Linux<\/STRONG> versions.<\/p>\n<p>The Windows version uses a GUI application called GIT GUI for creating a repository. On Linux, you can use the console application GIT BASH to follow the Linux tutorial, which is also available online at: <A href=\"http:\/\/www.kernel.org\/pub\/software\/scm\/git\/docs\/gittutorial.html\" rel=\"nofollow noopener noreferrer\">http:\/\/www.kernel.org\/pub\/software\/scm\/git\/docs\/gittutorial.html<\/A>.<br \/>\n<H3>Setting up a Git repository<\/H3><br \/>\nFor Polarion&#8217;s internal testing of the external repositories feature with a cloned Git repository, our QA team created a repository on <A href=\"https:\/\/blogs.plm.automation.siemens.com\/www.github.com\" rel=\"nofollow noopener noreferrer\">www.github.com<\/A>. Let&#8217;s say this repo is called <SPAN style=\"font-style: italic;\">test2<\/SPAN>, and the user name is <SPAN style=\"font-style: italic;\">test2<\/SPAN>YourName.<\/p>\n<p>With the repository created on github.com, there are some steps needed on the client side.<\/p>\n<p>1. Global setup<\/p>\n<p>Download and install GIT. Then use the command line to run:<br \/>\n<CODE><br \/>\ngit config &#8211;global user.name &#8220;YourName&#8221;<br \/>\ngit config &#8211;global user.email your.name@yourdomain.com<br \/>\n<\/CODE><\/p>\n<p>2. Local initialization<\/p>\n<p>Run the following from the command line:<br \/>\n<CODE><br \/>\nmkdir test2<br \/>\ncd test2<br \/>\ngit init<br \/>\ntouch README<br \/>\ngit add README<br \/>\ngit commit -m &#8216;first commit&#8217;<br \/>\ngit remote add origin git@github.com:YourName\/test2.git<br \/>\ngit push -u origin master<br \/>\n<\/CODE><\/p>\n<p>Need to access an existing GIT Repo? Run this on the command line:<br \/>\n<CODE><br \/>\ncd existing_git_repo<br \/>\ngit remote add origin git@github.com:UserName\/RepoName.git<br \/>\ngit push -u origin master<br \/>\n<\/CODE><br \/>\n<H3>Authentication on Windows<\/H3><br \/>\nGIT uses the SSH authentification method. You can find info on SSH setup for Windows at <A href=\"http:\/\/help.github.com\/win-set-up-git\/\" rel=\"nofollow noopener noreferrer\">http:\/\/help.github.com\/win-set-up-git\/<\/A><\/p>\n<p>If you will configure Polarion to use your GIT repository, and if Polarion is running as a service (the preferred way unless you&#8217;re just running Polarion for an evaluation), you&#8217;ll  need to add the HOME system variable pointing to the location where the .ssh folder is created. If you need a refreshed on how to add a system variable, check out: <A href=\"http:\/\/www.itechtalk.com\/thread3595.html\" rel=\"nofollow noopener noreferrer\">http:\/\/www.itechtalk.com\/thread3595.html<\/A>.<br \/>\n<H3>Git it Working With Polarion<\/H3><br \/>\nBy default, Polarion uses the Subversion (SVN) repository that was bundled with the distribution and installed with the platform. This <SPAN style=\"font-style: italic;\">Default<\/SPAN> repository is used for all projects. The assumption is that development code bases are managed in this same SVN repository. However, if you have code bases managed in another repository, you can configure your Polarion project to enable linking of Polarion Work Items (<SPAN style=\"font-style: italic;\">Default<\/SPAN> repository) to revisions in the external repository. External repositories can be either Git or Subversion.<\/p>\n<p><STRONG>How to configure your Polarion Project for Git<\/STRONG><br \/>\nThe <SPAN style=\"font-style: italic;\">Repositories Configuration<\/SPAN> topic in project Administration enables you to specify one or more external repositories so that revisions there can be linked to Polarion Work Items in the project. It&#8217;s possible to configure more than one external repository, and you can have both Subversion and Git repositories.<\/p>\n<p>Here&#8217;s the step-by-step to for configuring Polarion to work with a Git repository:<br \/>\n<OL><br \/>\n\t<LI>Log in with administrator permissions for the project you want to configure to use a Git repository, and open the project. (Enter Administration if your login did not already take you into it.)<\/LI><br \/>\n\t<LI>In Navigation, select <SPAN style=\"font-style: italic;\">Repositories Configuration<\/SPAN><\/LI><br \/>\n\t<LI>In the Repositories Configuration page, click the <SPAN style=\"font-style: italic;\">Add New Repository<\/SPAN> button.<\/LI><br \/>\n\t<LI>In the Provider list, select <STRONG>Git<\/STRONG>. When you select the repository type, a set of fields specific to the selected type appears below the list control. In this case, you&#8217;ll see the fields for Git.<\/LI><br \/>\n\t<LI>Fill in the fields with data specific to the repository you want the Polarion project to access, noting the required fields marked with a red asterisk (*).<br \/>\n<EM>Comment<\/EM>: Local Repository is the location of the &#8220;.git&#8221; folder on the filesystem in your git repository clone.<\/LI><br \/>\n\t<LI>Click the Save button to save the configuration settings.<\/LI><br \/>\n<\/OL><br \/>\nIt&#8217;s important to remember that the <SPAN style=\"font-style: italic;\">Default<\/SPAN> SVN repository is always used by Polarion to store Work Items and other Polarion data. If you have source code for the project in this repository as well as in the external Git repository, then after adding the external Git repository(ies) to the configuration, you must explicitly add the <SPAN style=\"font-style: italic;\">Default<\/SPAN> repository back to the project configuration. If you don&#8217;t do that, then users won&#8217;t be able to link source code revisions in the <SPAN style=\"font-style: italic;\">Default<\/SPAN> repository to Work Items. In this case, you would repeat the above steps selecting Default in the Provider list.<\/p>\n<p>We learned a few things about Git as our development team got Polarion working with it in version 2011-SR1. But we&#8217;re still more Git Newbie than Git Expert (<A href=\"http:\/\/www.polarion.com\/products\/svn\/index.php\" rel=\"nofollow noopener noreferrer\">Subversion<\/A> has been our thing). If you&#8217;ve got a good tip for people who are just getting going with Git &#8211; please post a comment!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>By default, Polarion installs and uses a Subversion repository. But what if you have some codebase in an external repository&#8230; a Git repo, for example? And if you&#8217;re new to Git, how do you set up a &#8230;<\/p>\n","protected":false},"author":68984,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spanish_translation":"","french_translation":"","german_translation":"","italian_translation":"","polish_translation":"","japanese_translation":"","chinese_translation":"","footnotes":""},"categories":[1],"tags":[],"industry":[],"product":[],"coauthors":[],"class_list":["post-628","post","type-post","status-publish","format-standard","hentry","category-news"],"_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/628","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/users\/68984"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/comments?post=628"}],"version-history":[{"count":1,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/628\/revisions"}],"predecessor-version":[{"id":629,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/posts\/628\/revisions\/629"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/media?parent=628"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/categories?post=628"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/tags?post=628"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/industry?post=628"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/product?post=628"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/polarion\/wp-json\/wp\/v2\/coauthors?post=628"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}