Nav
You are viewing an older version of this topic. To go to a different version, use the version menu at the upper-right. +

Preparing a gitignore File

This page describes a feature that is currently available using Mule Studio (December 2013) or newer.  Download and launch the latest version of Anypoint Studio to take advantage of this feature.

As a part of a team of developers, you may be using a source code management (SCM) tool such as git to keep track of changes in an application. Studio supports the use of git by presenting an option to prepare a standard ` gitignore ` file for a new Mule Project.

Prerequisites

This document assumes familiarity with git as a software version control system, and that you are using Mule Studio to build a new application that you intend to manage using git.

Configuring a gitignore File

A project’s ` gitignore ` file contains a list of files and folders that git should ignore when tracking a project. Because all Studio projects contain a set of files that git should not include in its version control, you can create a gitignore file when creating a new Mule Project in Studio.

  1. Create a new Mule Project (File > New > Mule Project).

  2. In the first pane of the New Mule Project wizard (see image below), check Create a default .gitignore file:

image

  1. Click Finish to save and open your new project.

Studio stores the gitignore file as a hidden file in the project’s root directory. To view the contents of the file, change the settings of your operating system to display hidden files.

gitignore File Contents

A gitignore file generally includes several files and folders that are commonly part of Java and Eclipse projects. A gitignore file prepared in Studio contains a few more Studio-specific elements (see table below). 

Full .gitignore File Contents


         
      
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Java defaults (https://github.com/github/gitignore/blob/master/Java.gitignore) #
# --- #
*.class
# Package Files #
*.jar
*.war
*.ear
# --- #
# Eclipse-specific (https://github.com/github/gitignore/blob/master/Global/Eclipse.gitignore) #
# --- #
*.pydevproject
.metadata
bin/**
tmp/**
tmp/**/*
*.tmp
*.bak
*.swp
*~.nib
local.properties
.settings/
.loadpath
# You may want to remove the sharp symbols here if you are using Maven
#.project
#.classpath
# External tool builders
.externalToolBuilders/
# Locally stored "Eclipse launch configurations"
*.launch
# CDT-specific
.cproject
# PDT-specific
.buildpath
# --------------- #
# Studio-specific #
# --------------- #
.studio/
flows/
target/
**/*.mflow
Studio-specific Ignored File or Folder Reason

              
           
1
.studio/

A hidden folder, it contains information that is irrelevant for synchronizing such as cached metadata files that git does not need to track.


              
           
1
flows/

Including this folder in gitignore ensures that git does not track visual changes in the canvas which have do not affect the working of the flow.


              
           
1
target/

Including this folder in gitignore ensures that git does not track the elements Studio uses to construct the target folder upon build.

See Also

We use cookies to make interactions with our websites and services easy and meaningful, to better understand how they are used and to tailor advertising. You can read more and make your cookie choices here. By continuing to use this site you are giving us your consent to do this.

+