Tag: gitignore

gitignore across all branches?

Hey I’m trying to get into git, as an emacs user first thing to do is to make sure the ~ and #*# files are ignored by git. Documentation talks about .gitignore which I’ve been using. However couple of questions remain: gitignore is now checked in and part of a branch. Should .gitignore be checked […]

What should I include in the .gitignore file for Swift playgrounds?

I want to use Git for versioning my playgrounds, but I am not sure which files should be ignored and which ones I should commit. Currently I use following .gitignore file for playgrounds: # Xcode user data xcuserdata What else should be there?

Git: how to ignore hidden files / dot files / files with empty file names via .gitignore?

This question already has an answer here: Git: how to ignore hidden directories? 3 answers

Sunspot Solr Gem & .gitignore

I am running the sunspot_solr & sunspot_rails gem in development and I get an insane number of changes to index files and data files every time I start and stop the development and/or sunspot server. It’s driving me crazy doing version control. gem “sunspot_solr”, “~> 2.1.0” gem “sunspot_rails”, “~> 2.1.0” Which of these files/directories can […]

Git ignore all files of a certain type except in all subdirectories of a certain directory?

I’m trying to make a gitignore file that will ignore all .jar files unless they’re in a folder called libs. Here’s my basic file structure: -.gitignore -libs/ -goodFile.jar -someFolder/ -subFolder/ -alsoGood.jar -otherCode/ -fileToExclude.jar -otherOtherCode/ -otherSubfolder/ -alsoExclude.jar Currently in .gitignore I’ve tried: *.jar !libs !libs/ !libs/* !libs/** !libs/**/ !libs/**/*.jar !libs/*.jar Either on their own, in combination, […]

Git ignoring icon files because of Icon? rule

I have a repo that includes SVG images in an icons/ directory. Attempting to add these images to the repo fails, and Git complains with the error message: The following paths are ignored by one of your .gitignore files: public/img/icons/my-icon.svg Use -f if you really want to add them. When I traced the ignored files […]

git ignore all files except one extension and folder structure

This is my .gitignore: #ignore all kind of files * #except php files !*.php All I want is to ignore all kind of files except the .php ones, but with this .gitignore I’m also ignoring folders… Is there a way to tell git to accept my project folder structure while keeping the track only of […]

Why is git ignoring my changed file?

I make an arbitrary change to a file within my git working directory. git status does not recognized that the file has changed. git add /path/to/file has no effect. git add -f /path/to/file has no effect. git status /path/to/file shows the file as in the ‘changes to be committed’ bucket. I removed my .gitignore file, […]

How can I tell git to ignore LibreOffice lock files?

I have a git repo which contains some XSLX files. I edit them with LibreOffice every once in a while. Sometimes LibreOffice won’t remove the lock files ( ./folder/.~lock.filename.xslx#). This causes those files to be liested as new on every git status. I would like git to ignore them. I tried the following in .gitignore […]

.gitignore NuGet packages folder at any level but include .targets file at any level

I’m trying to implement the workaround for the NuGet Package Restore Issues. This involves ignoring the contents of all packages folders, at any level in the hierarchy. However, .targets files (typically in subfolders of packages folders) should not be ignored. For example: .gitignore YourProject/ YourProject.csproj packages/ repositories.config Microsoft.Bcl.Build.1.0.7/ lib/ foo.dll tools/ Microsoft.Bcl.Build.targets Should include only […]

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