Is there an ignore command for git like there is for svn?

后端 未结 11 2666
一个人的身影
一个人的身影 2020-12-23 00:21

I am a new user to git and I am starting a new project. I have a bunch of dot files that I would like to ignore. Is there an ignore command for git

11条回答
  •  别那么骄傲
    2020-12-23 00:54

    A very useful git ignore command comes with the awesome tj/git-extras.

    Here are a few usage examples:

    List all currently ignored patterns

    git ignore
    

    Add a pattern

    git ignore "*.log"
    

    Add one of the templates from gitignore.io

    git ignore-io -a rails
    

    git-extras provides many more useful commands. Definitely worth trying out.

提交回复
热议问题