简体   繁体   中英

gitignore for vim plugin

I'm about to write my first vim plugin/script. As I like to write and simultaneously practice with Git, I need a .gitignore file specified for this issue. Is there something like a template of a .gitignore file or do I have to write it myself? Are there any suggestions on how a proper .gitignore file for the sake of a vim plugin/script could look like?

Thanks in advance

As @romainl pointed out, your .gitignore will be specific to the technologies that you are using, but to get some ideas for how these files generally look check out: https://www.gitignore.io/

I would recommend adding patterns to your .gitignore and adding files that you think will match those patterns to your repo to verify that you understand how the pattern matching works.

To verify, do a "git status" and see if the file you just added is showing as a change or not. If you don't see the file, then you know the .gitignore is working.

In general, if you have certain type of files you want to ignore; for example for .foo files, you will want a pattern like:

*.foo

If you have a particular directory that you want to ignore, for example a directory called dist , you will want a pattern like this:

dist

Read this link for general information about how .gitignore works: https://git-scm.com/docs/gitignore

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