Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6248521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:04:29+00:00 2026-05-24T13:04:29+00:00

I have some files like vim.gitignore , SVN.gitignore and CVS.gitignore (spread around on my

  • 0

I have some files like vim.gitignore, SVN.gitignore and CVS.gitignore (spread around on my hard disk).

Can I simply include these gitignore files in a .gitignore file in a new Git project?

Edit: I have a global ignore file already.
I just want to ignore different files in different types of projects, is this possible?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T13:04:30+00:00Added an answer on May 24, 2026 at 1:04 pm

    You could:

    • Have a template repo with:
      • those xxx.gitignore files in it:
      • a .gitignore file with “xxx-gitignore-xxx” in it (in other word, with a content you can easily identify
      • a .gitattribute filter driver

    (for each new repo, you clone it and can start with those files already there.
    Then you remove the remote ‘origin‘, or replace it by whatever remote repo you want to push to)

    smudge content filter
    (image shown in “Customizing Git – Git Attributes“, from “Pro Git book“)

    On any checkout of your repo, the filter driver will, through the smudge script:

    • recognize the content of the .gitignore file
    • check if the xxx.gitignore content isn’t already there (by looking for a specific string which only those files have)
    • if their content isn’t there, it will append the content of those xxx.gitignore files
    • if the content is already up-to-date, it wouldn’t modify the .gitignore.

    Note that having a identifiable content is key here, since a filter driver script doesn’t have the name/path of the file it filters.

    It is a bit convoluted, but seems to be the only way to implement the “include” feature you want.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some files in my SVN repository that I would like to have
I have some files that I'd like to delete the last newline if it
I have some binary files that I'd like to embed in a dll I'm
I have some pdf files located on a http server: Like: http://domain.com/files/file1.pdf http://domain.com/files/file1.pdf http://domain.com/files/file1.pdf
I have some folder with different files. I want to use something like this:
I have a web directory where I store some config files. I'd like to
I'd like to search some string(regex) in bunch of files in VIM. I'd like
We have some files with the jQuery vsDoc includes like this for syntax help;
I have some values in a configuration file (XML file) with some values like
I would like to create a file whose descriptor would have some customizable behavior.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.