Tag: gitignore

Gitignore not ignoring some build files in Android library

I have an Android library and for some reason, the files and folders I have specified in my .gitignore are not being ignored. I have tried modifying my .gitignore and also following these steps, but this doesn’t change anything. Here is my top-level .gitignore (which can also be found on the GitHub repo): # Gradle […]

How do I reset .gitignore

I have copied a previous project that has git allready in it. I have removed .git and .gitignore folders. Then reïnitialized git and generated a .gitignore file. Which is completely empty. But somehow the files ignored in the previous project still remain ignored in this new project… so when I run the command git clean […]

Get git not to ignore directory after wildcard ignore

I have the following in my .gitignore: * !.gitignore !.gitconfig !.vimrc !.bash/ !README.md I would like git to track everything in that .bash/ directory, but it seems to be ignoring it, but tracking everything else. I have also tried !.bash/*, but that didn’t work. What’s the trick to get this working?

Gitignore Exceptions Not Being Added to Tracking

I have the following in my .gitignore: *.log /bower_components/* /node_modules !/bower_components/v-accordion !/node_modules/todomvc-app-css/* I added the last two lines after I installed those components, so that may be the issue, but I cannot tell. Either way, I would like to track changes to those directories as I am actively customizing them and pushing to production. However, […]

Why .gitignore not working for the new project in Android Studio?

I created project in Android Studio with .gitignore file. .DS_Store # built application files *.apk *.ap_ # files for the dex VM *.dex # Java class files *.class # generated files bin/ out/ gen/ # Libraries used by the app # Can explicitly add if we want, but shouldn’t do so blindly. Licenses, bloat, etc. […]

Include generally excluded file from specific folder

In my project, I have generated files Widget.js in project subfolders, so I git-ignore them with this rule: widgets/*/Widget.js so it ignores files like: widgets/ignore_1/Widget.js widgets/ignore_2/Widget.js But now, in one specific folder, I want to include this file to repository. E.g.: file widgets/include_1/Widget.js should be included. Is there any possibility to set the rules as […]

gitignore file is ignoring the wrong directory

I have a simple directory structure: gitroot/ └── docker/ └── critical_dependencies/ I would like to just ignore the entire contents of the critical_dependencies/ directory. My .gitignore file has the following entry: docker/critical_dependencies/* It doesn’t seem to be ignoring any of the folders that are in that directory. What is the proper way to ask the […]

.gitignore – ignore file starting with ~

To ignore any file starting with ~(tilde), I put following in gitignore file ^~.* But, it is not working for the file name starting with ~(eg. ~$ofession email.docx). There is no issue with gitignore configuration setting as other patterns are working well. What is wrong here with the regular expression?

Git – Multiple branches with different file systems

How to correctly organize multiple branches with each having different file system? Here is the situation – I have two branches: Current master with project files that were made a year ago Current develop with new project files (completely different framework) that is about to develop and at one moment switch The point where things […]

Git – ignore directory when pulling, don't when pushing

I searched for an answer to this, but I just found other stuff related to .gitignore. I have a demo folder in my repo for a demonstration of my package. When I push, I want it to be uploaded just because I want it stored and updated along with the package. However, when someone clones […]

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