Reputation: 1689
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.
/libs
# Build stuff (auto-generated by android update project ...)
build.xml
ant.properties
local.properties
project.properties
# Eclipse project files
.classpath
.project
# idea project files
.idea/
.idea/.name
*.iml
*.ipr
*.iws
##Gradle-based build
.gradle
build/
After this I used git init
command in project directory.
git add .
and git status
commands
git status
command with empty value
Version of Git is 1.9.1. I don't understand why those files added to commit.
Upvotes: 4
Views: 1846
Reputation: 446
Probably, this is a bug in 1.9.1 version.
You should update git.
Updates since v1.9 series
- Trailing whitespaces in .gitignore files, unless they are quoted for fnmatch(3), e.g. "path\ ", are warned and ignored. Strictly speaking, this is a backward-incompatible change, but very unlikely to bite any sane user and adjusting should be obvious and easy.
Fixes since v2.0
- Mishandling of patterns in .gitignore that have trailing SPs quoted with backslashes (e.g. ones that end with "\ ") has been corrected. (merge 97c1364be6b pb/trim-trailing-spaces later to maint).
Fixes since v2.4
- The codepaths that read .gitignore and .gitattributes files have been taught that these files encoded in UTF-8 may have UTF-8 BOM marker at the beginning; this makes it in line with what we do for configuration files already. (merge 27547e5 cn/bom-in-gitignore later to maint).
Upvotes: 2