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 8835943
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:22:41+00:00 2026-06-14T09:22:41+00:00

I created a repository for my home folder. This is my .gitignore file: !.vim/plugin/*

  • 0

I created a repository for my home folder. This is my .gitignore file:

!.vim/plugin/*
!.vim/doc/*
.*
*
.viminfo
.vim/.netrwhist
.vim-fuf-data/file/stats
bin/dwm/dwm

So when I create a new file inside .vim/plugin I expected that after git status this file was shown, but no..why?

EDIT: after a pair of answers I changed the position of inverse ignoring lines this way below, but the problems is the same: the new files I create inside the .vim/plugin folder are not shown after git status..

.*
*
.viminfo
.vim/.netrwhist
.vim-fuf-data/file/stats
bin/dwm/dwm
!.vim/plugin/*
!.vim/doc/*
  • 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-06-14T09:22:43+00:00Added an answer on June 14, 2026 at 9:22 am

    In line 4 you’re ignoring everything with *. This overrides the previous negating pattern. From the man page:

    within one level of precedence, the last matching pattern decides the
    outcome

    Where “level of precedence” means different sources for ignore patterns like .gitignore and $GIT_DIR/info/exclude.

    If you want to ignore everything but the patterns beginning with ! you should move the * to the beginning of .gitignore


    Edit

    I found a solution with the help of another question on SO:

    *
    !*/
    !.vim/plugin/*
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I created a bare repository on a file-server in my local network at home.
My colleague created a repository in Bitbucket. I first created a folder in my
I follow this tutorial to create a svn http://www.guyrutenberg.com/2007/10/29/creating-local-svn-repository-home-repository/ However after running $ svn
I have created initial import of my eclipse project to local file like this:
The folder structure is as follows : /home/src/repositories/svntest/branches and access to the repository is
I've set up svn /home/svn/repository/project and created trunk, branch and tags under /tmp/svn-structure-template .
I had created project. New File or Project=>git Repository Clone=> clone url git://github.com/negativ/eiskaltdcpp.git=>The process
I created a repository in my local machine: svnadmin create /home/me/Desktop/svn_test/trunk Then import myDir
I've got a standard repository for my project /home/repo/.git this is the repository i
I created a directory, hello_git . In this directory I created a file, hello_git.py

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.