Tag: gitignore

how can I use git to track folder structure?

This question already has an answer here: .gitignore exclude folder but include specific subfolder 8 answers

.gitignore directory/wildcard unexpected behaviour

Folder structure of the git project: .git/ <some git stuff> .gitignore level1/ level2/ file1 file2 The files .gitignore, file1, and file2 are all empty. I run git add .gitignore and git commit -m “create empty .gitignore”. If the .gitignore is emtpy, git add -A followed by git status outputs (as expected): new file: level1/level2/file1 new […]

Git : using .gitignore with different branches

I have a pretty basic work environment but does not manage to work with Git as desired. Here is how we can describe it : two branches A and B with two files each in their working trees, the first file is toMerge and the second is toKeepSpecific. I have the same .gitignore in the […]

Git – git add in a gitignore directory

If my .gitignore file has tmp\ in it and I do a git add file.test from tmp, Git adds file.test to the repository. If file.test never changes, than this is as good as a one time add to the repository, right? Say for static files that I want to be in version control. You want […]

Git ignore and unversioned local files

There are a lot of questions out there covering ignoring things in git, but none seem to work for my particular situation. I have a project that looks like this: proj |-foo/ |–project-file.txt |-bar/ |–project-file2.txt |-temp/ |–machine-specific-file.txt |–machine-specific-file2.txt (EDIT: added for clarity) My .gitignore file: temp/ My project has several branches, all of which have […]

Having trouble “untracking” file (ignore further changes to tracked file)

I have an issue on git. Recently I made a mistake and added a directory to my repo by using git add -f path/to/folder. Now I’m trying really hard to ignore this folder but nothing works. So far I did : git update-index –assume-unchanged path/to/folder The command above did the job but once I give […]

gitignore negations ignored by git for osx xcode project

This question arises from reading and commenting on another question: Git ignore file for Xcode projects While Adam’s answer (and accompanying gist) appears definitive, I cannot actually get it to work. My understanding of the gitignore syntax seems incomplete. My setup: OSX 10.8.2, git version 1.7.9.6 (Apple Git-31.1). There are no global gitignore files. I […]

Short syntax for ignoring directory/ and .directory/ in .gitignore?

Is there a short syntax for ignoring directory/ .directory/ at my .gitignore (something in the lines of \.?directory/)?

.gitignore file got cached

I have problems with my .gitignore file not ignoring directory that I set in it. on my mac I run: git status It show long list of files in .idea directory new file: .idea/[file name] git config core.excludesfile and It shows me the correct .gitignore file. I also been trying to run: git rm . […]

.sqlite files being ignored although not in the ignore list

I have checked the global ignore rules in .gitignore_global, then I checked the global rules in .gitconfig, but I could not find such file in my system (Ubuntu Linux, nothing in ~/). Then I also checked the project’s ./git directory but it does not have any .gitignore file as well. In spite of all this, […]

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