Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT .hgignore / .gitignore entries

What are the typical entries in your source control ignore files for a GWT App (developed in eclipse)?

like image 774
roshan Avatar asked Nov 13 '11 03:11

roshan


People also ask

Does .gitignore work in subdirectories?

gitignore file is usually placed in the repository's root directory. However, you can create multiple . gitignore files in different subdirectories in your repository.

How do I exclude a .gitignore file?

If you want to ignore a file that you've committed in the past, you'll need to delete the file from your repository and then add a .gitignore rule for it. Using the --cached option with git rm means that the file will be deleted from your repository, but will remain in your working directory as an ignored file.

How do I Gitignore the contents of a folder?

A . gitignore file is a plain text file where each line contains a pattern for files/directories to ignore. Generally, this is placed in the root folder of the repository, and that's what I recommend. However, you can put it in any folder in the repository and you can also have multiple .


1 Answers

I would recommend:

  • you leave the eclipse files (.project, .classpath, ...) in your VCS,
  • you ignore what is generated by GWT compilation, like in this project (.gitignore)

:

/build
/classes
*.jar
*.class
*~
*/web-app/gwt
*/web-app/WEB-INF/classes
target

The name of certain generated directories can vary slightly, so you should adapt them for your project.

like image 156
VonC Avatar answered Sep 22 '22 15:09

VonC