Tag: gitignore

Remove tracked ignorned files from repo but not locally

I keep running into a scenario where someone on our team pushes an initial commit without first adding a .gitignore to their project. This results in a bunch of files ending up in the repo that we don’t want tracked. git ls-files -i –exclude-from=.gitignore gives me a list of files that are ignored by .gitignore […]

How can I version my .git/config file?

I have a .gitignore file like the following: .* !.gitignore And I would like to version my .git/config file such that when I do a git pull my .git/config file updates automatically. How can I do this? I tried something like: .* !.gitignore !.git/config But this didn’t work. I know if I create a link […]

ignore gitignore files in subdirectories

This is the content of my “root” .gitignore # exclude everything … * # …except !/.gitignore !*/ !/modules/wp-azth/** the problem is that, under modules folder, i’ve a lot of third-party modules with a .gitignore file inside. Using rules above, all third-party modules folders are ignored but their .gitignore files are not ( and i don’t […]

.git/info/exclude replacement for git submodule?

I’m having python script to download dependencies for my library (that is extracted as git repository) and it adds lines to .git/info/exclude for git repository. But when it’s extracted as submodule no .git/info/exclude file exists and i still need to exclude some paths without adding them to ‘.gitignore‘. Any change to do it? repo ├─.git […]

git very slow with many ignored files

I have set up a repository to include a working directory that has many tens of thousands of files, thousands of directories, with many Gb of data. This directory is located on a samba share. I only want to have a few dozen source files within this directory under version control. I have set up […]

Using .gitignore to not commit bin, debug and config folders

I’m using git in my ASP.NET MVC project. I want no files from debug, bin or config folder to show in the “Pending Chages” dialog so I will not have to commit them to my repository. These files are machine specific specially the config folder. I tried to add the following to .gitignore: myproject\bin** myproject\obj** […]

Can I use .gitignore_global to ignore file for all users over multiple repos?

In my dev team, we have multiple projects spanned across several git repos. Those projects actually share a few common config elements. We have recently made a local change to one of our shared config files that none of us wish to commit to the production environment. /www/ | |– git repo 1 (containing shared […]

Git Glob syntax: ignoring files everywhere or in a specific folder

I would like to exclude .DS_Store tracking from myfolder and all subfolders. I also want to exclude a .project file from myfolder (but not from its subfolders). What should I write in .gitignore (situated in myfolder)? .DS_Store # or *.DS_Store ? I mean, is the asterisk necessary? ./.project # is this syntax correct?

.gitignore not ignoring the files Django

So I’m testing out Heroku with a dummy app called hellodjango, and pushing everything to git. Added my .gitignore file (tell me if I’m wrong, I created a text document called django.gitignore, and the contents are 1 line, no spaces, venv*.log*.pot*.pyclocal_settings.py. Not sure what I’m doing wrong, but here is my directory hellodjango/ django.gitignore manage.py […]

Can I commit a file with git, but automatically ignore it when doing a git svn dcommit?

I’m starting now to adopt Git for my personal workflow at an SVN office, so git-svn is a tool I’m going to be relying on heavily. One issue I’ve come across that I don’t know how to resolve is how to ignore in one direction. The specific use case for me is that our ant […]

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