I executed these commands on intranet server (initialized empty Git repository in /home/git/project/):
mkdir project
cd project
git init --bare
Then I executed these commands on client:
git clone git@server:project
Then copied android source code (directory: alps/
) to project
git status
git add .
git commit -m "xxx"
git push origin master
When this operation was done, I deleted the project and cloned it from server again. Some files were lost (e.g.:some .mk
files in alps/external/chromium_org
)
Why did it happen?
Most probably you've got the
.mk
extension in your.gitignore
file. The file is in the project root directory. It may be hidden.If you're sure that you want
.mk
files under source control, find a line with it in the.gitignore
and delete that line.Then:
By the way, a good sample of
.gitignore
for Android can be found in GitHub default.gitignore
files.