Tag: gitignore

Ignoring all files in a directory except one in GIT using negate prefix

I want to ignore all the files in a directory except one file. I do the following in my git bash. $ mkdir dir_to_ignore $ cd dir_to_ignore $ vi file_to_ignore.txt # (I put some content and save the file) $ vi second_file.txt # (Some text and then save the file. I dont wish this file […]

gitignore does not ignore files

The image says it all. Why is git telling me that I’ve changed the file when I’m explicitly telling it to ignore it?

What are the difference between these 3 .gitignore entries?

Here are the 3 /some_string some_string some_string/ I believe the second one refers to a file and the third one refers to a folder, but what about the first one?

How to add a folder to the .gitignore

Maybe my Googling skills are lacking but this seems like a question that should give me back thousands of hits and yet, I can’t find a straight answer. Simple as this: I do constant pushes to github to share with a remote developer. We both have npm and bower installed. No need to push these […]

Can I gitignore files with a prefix?

I have file a.css and b.css in the same folder. My framework combines those files in a file called temp.a12cab4598347b07f0079d.css This file will be generated wherever there is a css file, so folder matching is no good. Can I ignore all these files using something like temp.*.css Thank you

Should website image files be included in GIT repository?

I have a website file/folder structure template to start using with git. It contains an empty .gitignore file inside the images folder, which leads me to my two part question: 1.) Will this empty .gitignore file ignore all the images located inside the images folder, or was it placed there to allow the empty folder […]

How to git ignore folders that begin with # sign

Is it possible to create a .gitignore file, that ignores files or folders that begin with #? Example: #DATABASE_FILES #DOCUMENTATION

Allow node.exe and ignore all other .exe

I want to not igore the file node.exe but ignore all other .exe files, how can I achieve this? My code is not working: # Compiled source # ################### /build/* !node.exe *.exe *.o *.so *.com *.pdb *.ini

Managing a framework with Git, ignoring changes to given files after first pull

I’m using git to manage an extended CodeIgniter Framework. It’s a clone of the current CI release with extra helpers, libraries ect. I have many sites all using this framework and if I add a new helper method or fix a bug in one site I want to be able to easily update all the […]

Git ignore subfolders but not the files in a folder

I’ve been looking around and just could not find the same scenario that I have. I have: –public |–img |–logo (folder) |–post_image (folder) |–banner.jpg |–icon.ico |–image1.jpg |-……..etc I need to ignore the logo and post_image folders, but I want to keep every file that is inside img folder. How would I go about it? Right […]

Git Baby is a git and github fan, let's start git clone.