Rubymine: How to make Git ignore .idea files created by Rubymine

前端 未结 18 2029
隐瞒了意图╮
隐瞒了意图╮ 2020-12-07 08:35

I use Rubymine for Rails projects. Very often, Rubymine makes changes in .idea/* files that I don\'t care about. But it keeps preventing me from checking out ne

18条回答
  •  爱一瞬间的悲伤
    2020-12-07 09:39

    I suggest reading the git man page to fully understand how ignore work, and in the future you'll thank me ;)

    Relevant to your problem:

    Two consecutive asterisks ("**") in patterns matched against full pathname may have special meaning:
    
    A leading "**" followed by a slash means match in all directories. For example, "**/foo" matches file or directory "foo" anywhere, the same     as pattern "foo". "**/foo/bar" matches file or directory "bar" anywhere that is directly under directory "foo".
    
    A trailing "/**" matches everything inside. For example, "abc/**" matches all files inside directory "abc", relative to the location of the .    gitignore file, with infinite depth.
    
    A slash followed by two consecutive asterisks then a slash matches zero or more directories. For example, "a/**/b" matches "a/b", "a/x/b",     "a/x/y/b" and so on.
    
    Other consecutive asterisks are considered invalid.
    

提交回复
热议问题