Git uses one of the basic uses of--git
Git uses the second ——. Gitignore file detailed
Git using the three ——. git folder detailed
The installation of the GitHub desktop version of Git using the quad--windows
Git uses the five--github to keep the fork project synchronized with the original project
Git uses the six--github work together Fork+pull Request
Git uses the seven--android studio under the correct use of the file role of Git
In general, a ". Gitignore" file is needed in each Git project to tell git which files need not be added to version management.
In project development, many files are not required to be included in version management, such as Java bytecode files. class, Android virtual machine files. Dex and some configuration files that contain passwords.
The contents of this file are rules that git will use to determine whether to add files to version control.
Here's a look at the common rules:
/build/ #过滤整个build文件夹
*.class #过滤所有. class file
/.idea/libraries #过滤具体文件
1 2 3 1 2 3
It's not hard, #后面的就是注释咯. Filtered files will not appear in the Git library, if the push to GitHub, GitHub library is not the files, others fork will not produce unnecessary consequences, of course, the local library also, just push the time will not upload.
It should be noted that. Gitignore can also specify which files to add to version management:
!*.apk #添加 *.apk files to git library
1 1
The difference is that the rule begins with an exclamation point, and Git adds the file that satisfies the rule to version management.
Such rules are sometimes needed, such as we only need to manage the Readme files in the/app/directory, and no other files in this directory need to be managed. Then we need to use:
/app/
!/app/readme
1 2 1 2
If only the filtering rules do not add rules, then you need to write down all the files in the/app/directory except for the README. Listen to the trouble Ah, this is the embodiment of dialectical thought, a yin and yang of the perfect expression of the Tao. Use
There's a plugin under Android Studio. Ignore, the number one is the goods, download, restart as, and then you can
When the work item was first added to Git version control, will automatically build the project. Gitignore and the modules of the. gitignore file, add a sentence, if not, add their own manually, Linux under the optional Add, but window has a problem, the file can not be created, in fact, you only in the final price. Yes, it is named:. Gitignore. OK after the confirmation. Each module has a. gitignore file OH. Posture
This file is very useful, the filter rules write well, reduce unnecessary trouble, the project joined Git version of the generated. Gitignore file contains content, but we also need to modify the modified, from here: What should is in the I. Gitignore for Android Studio project?
So good to do, modify the OK slightly
The position of the. Gitignore of each module:
/build
*.IML
1 2 1 2
The position of the. Gitignore under the project:
/.idea/workspace.xml
/.idea/libraries
. Ds_store
. Captures
#built application files
*.apk
*.ap_
# files for the Dex VM
*.dex
# Java class Files
*.class
# generated files
bin/
gen/
# Local configuration file (SDK path, etc) C14/>local.properties
# Windows thumbnail db
thumbs.db
# OS X Files
. Ds_store
# Eclipse project Files
. classpath
. Project
# Android Studio
*.iml
. Idea
. Gradle
build/
#NDK
obj/
The 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 The 31, the, the, and the 32, the- 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
Welcome to add changes, thank you for your attention
Ensure that before the push,. gitignore files have been configured, otherwise, the following may be a variety of exotic problems, I remember ...
Enjoy
Yue share, the happier ^_^
Welcome to Exchange, reprint please indicate the source, thank you.