Information Technology Reference
In-Depth Information
Solution
Clone the repository you want to contribute to:
$ cd git-recipes
$ mkdir 13-10
$ cd 13-10
$ git clone http://github.com/symfony/symfony.git .
When you open a new project with NetBeans the IDE creates the nbproject/
directory in the root directory of the project. To avoid committing the directory
nbproject/ create the following entry in .git/info/exclude file:
/nbproject/
You can do this with the following command:
$ echo /nbproject/ > .git/info/exclude
Now start NetBeans and open the project you just cloned. IDE will create its
/nbproject/ directory, but thanks to the pattern /nbproject/ stored in the
.git/info/exclude file, the repository remains clean. The command:
$ git status -sb
doesn't report changes within the /nbproject/ directory.
How It Works
Many contemporary IDEs store their configuration on a per project basis using special
directories. NetBeans stores its configuration in the /nbproject/ directory, Ph-
pStorm and other tools produced by JetBrains store the configuration within the
/.idea/ directory. Because every developer can use different tools and editors these
files and directories are not usually committed with the project.
Because the configuration is stored within the working directory of your repository
by default, git will report these files with the $ git status command. To avoid this you
Search WWH ::




Custom Search