facebook

How do I see invisible files like .gitignore?

  1. MyEclipse IDE
  2.  > 
  3. Installation, Configuration & Updates
Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #607507 Reply

    Mork
    Participant

    I am trying to keep Myeclipse from adding all the .class and many other file types to Git each time they get compiled. I created a .gitignore file and put it in the project root and checked it in. Yet, the .class and other files continue to get staged.

    If I need to put that .gitignore in a particular location, please advise.

    But my first item is how to even “see” the .gitignore file as it doesn’t show up in any view that I’ve tried. I’ve searched online, but the examples for Eclipse don’t seem to apply to MyEclipse.

    Thanks in advance,

    • This topic was modified 5 years, 10 months ago by Mork.
    #607509 Reply

    Aaron Lara
    Member

    Hi Mork!
    You can see hidden *.filename files by going to Filters in the Package Explorer view and then checking the *.resources item. See Screenshots.

    For the right location of the .gitignore file you can use the Git Stagging view, then right click on a .class element (or any kind of file you want to hide) and then select ignore. It will automatically create a .gitignore file for you.

    Cheers!
    Aaron

    • This reply was modified 5 years, 10 months ago by Aaron Lara.
    Attachments:
    You must be logged in to view attached files.
    #607513 Reply

    Mork
    Participant

    Thanks Aaron. Your suggestion fixed the invisible file problem I was having. Difficult to realize it’s that tiny “v” to click.

    —–

    On my other issue, I don’t see an “ignore” option for the staging view. I had already tried that. See my attached screenshot below.

    Thanks in advance for your next reply. 🙂

    • This reply was modified 5 years, 10 months ago by Mork.
    Attachments:
    You must be logged in to view attached files.
    #607516 Reply

    Aaron Lara
    Member

    Can you try moving back the file to Unstaged Changes and then see if the ignore option appears?

    #607517 Reply

    Mork
    Participant

    I had tried that as well but no ignore option. And I tried both of these before creating a gitignore file.

    See screenshot for that case.

    Can you test and figure out what’s going on?

    Thanks very much

    Attachments:
    You must be logged in to view attached files.
    #607519 Reply

    Aaron Lara
    Member

    The option is correctly displayed at my end in MyEclipse CI 2018.12.0 (screenshot attached). Can you let me know what version of MyEclipse are you running? I’m checking up with my Team what can be causing this issue at your end.

    Cheers!

    Attachments:
    You must be logged in to view attached files.
    #607521 Reply

    Mork
    Participant

    That is so strange.

    I’m using this version:

    MyEclipse Enterprise Workbench

    Version: CI 2018.12.0
    Build id: 16.0.0-20181217

    Thanks

    #607522 Reply

    Aaron Lara
    Member

    Can you try clicking untrack first and then see if ignore option is enabled after that?

    #607529 Reply

    Mork
    Participant

    Yes, that seems to work, but it’s not creating a .gitignore file that I see and I then still have to untrack and ignore every .class or other file.

    —-

    I have a .gitignore file in the root of my project, but it’s not been respected. I just copied this one from an online posting, but it seems to have the relevant items I want to block.

    I’ll post this question on a Git forum since I’m obviously missing something still.

    Thanks for the great support! 🙂

    Attachments:
    You must be logged in to view attached files.
    #607531 Reply

    Aaron Lara
    Member

    Maybe if you share the content of the .gitignore we can give pointers. You might have already seen this but it’s worth reading: https://git-scm.com/docs/gitignore

    #607533 Reply

    Mork
    Participant

    Here’s the .gitignore as shown in the project structure above. I found this example online and it seems to have some good entries,

    It seems based on what I’ve read, it should be blocking these files, but nope. They’re still getting staged.

    # Compiled source #
    ###################
    *.com
    *.class
    *.dll
    *.exe
    *.o
    *.so

    # Packages #
    ############
    # it’s better to unpack these files and commit the raw source
    # git has its own built in compression methods
    *.7z
    *.dmg
    *.gz
    *.iso
    *.jar
    *.rar
    *.tar
    *.zip

    # Logs and databases #
    ######################
    *.log

    # OS generated files #
    ######################
    .DS_Store*
    ehthumbs.db
    Icon?
    Thumbs.db

    # Editor Files #
    ################
    *~
    *.swp

    # Gradle Files #
    ################
    .gradle
    .m2

    # Build output directories #
    ##########################
    /target
    */target
    /build
    */build

    # IntelliJ specific files/directories #
    #######################################
    out
    .idea
    *.ipr
    *.iws
    *.iml
    atlassian-ide-plugin.xml

    # Eclipse specific files/directories #
    ######################################
    .classpath
    .project
    .settings
    .metadata

    # NetBeans specific files/directories #
    #######################################
    .nbattrs

    #607534 Reply

    Aaron Lara
    Member

    Mork, I cannot see anything wrong with your .gitignore file. But look at this StackOverflow thread. It looks like you need to stop tracking all of those files first.

    Just a warning that if you do what the answer say (git rm -r --cached bin gen), it will remove the bin and gen dirs … Not sure if you want to do that.

    • This reply was modified 5 years, 10 months ago by Aaron Lara.
    #607536 Reply

    Mork
    Participant

    Since there’s really nothing in git that’s important yet for this project, how about I

    (1) TEAM-un-share it,

    (2) Then, delete the repository and just start over adding the files back into a new repo (where hopefully the .gitignore will be respected)?

    I’m cool with that approach.

    What do you think?

    Thanks,

    • This reply was modified 5 years, 10 months ago by Mork.
    #607538 Reply

    Aaron Lara
    Member

    I think that will work too.

    Good Luck!

    #607559 Reply

    Mork
    Participant

    The Team-disconnect seemed to work well, but I guess I clicked too many options when I removed the repository as that deleted the project from MyE (non-recoverable) as well. This project setup was all just for testing so I’ll be more careful in the future.

    Thanks again for all the great and helpful replies! 🙂

Viewing 15 posts - 1 through 15 (of 15 total)
Reply To: How do I see invisible files like .gitignore?

This topic is marked as closed to new replies, however your posting capabilities still allow you to do so.

You must be logged in to post in the forum log in