简体   繁体   中英

Eclipse or Maven add /target to gitignore

I'm using Maven and Git with a Java EE project (EAR, EJB and WEB), in Eclipse the workspace is rebuilding in loop beacause something adds "/target" to my .gitignore.

This is my gitignore :

     *.class
    *.settings
    *.project
    *.classpath
    target
    # Package Files #
    *.jar
    *.war
    *.ear
    /target
    /target
    /target
    /target
    /target
    /target
... (more and more /target)

Any idea what can add these lines?

This may help you.
Team -> Git -> Projects, disable "Automaticaly ignore derived resouces by adding them to .gitignore".

You can see when the file was modified and by who with the following command:

$ stat -x .gitignore 
  File: ".gitignore"
  Size: 210          FileType: Regular File
  Mode: (0644/-rw-r--r--)         Uid: (  501/jsmith)  Gid: (   20/   staff)
Device: 14,2   Inode: 15157009    Links: 1
Access: Wed Nov  6 13:11:04 2013
Modify: Sat Oct 26 12:53:41 2013
Change: Sat Oct 26 12:53:41 2013

Update to the last version of Eclipse and Maven. Then you can do some troubleshooting by creating other projects and monitor .gitignore .

Hope it helps :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM