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
.mkextension in your.gitignorefile. The file is in the project root directory. It may be hidden.If you're sure that you want
.mkfiles under source control, find a line with it in the.gitignoreand delete that line.Then:
By the way, a good sample of
.gitignorefor Android can be found in GitHub default.gitignorefiles.