Storing the Job information of Jenkins in Git

Jenkins provides the SCM configuration plugin which allows you to save every little configuration step automatically in Git repo.

I found the amount of commits a bit overwhelming, so I decided to control the commits manually and to save only the Job information and not the Jenkins configuration. For this switch into your Jenkins jobs directory (Ubuntu: /var/lib/jenkins/jobs) and perform the “git init” command.

I created the following .gitignore file to store only the Git jobs information:


Now you can add and commit changes at your own will. And if you add another remote to your Git repository you can push your configuration to another server.

About Lars Vogel

Lars Vogel is the founder and CEO of the vogella GmbH and works as Eclipse and Android consultant, trainer and book author. He is a regular speaker at international conferences, He is the primary author of With more than one million visitors per month this website is one of the central sources for Java, Eclipse and Android programming information.
This entry was posted in Other and tagged , . Bookmark the permalink.