1. Go to GitHub to register an account, create a code warehouse, get the warehouse address;
2. Use clone or create Respository + pull mode for creating a local repository;
3. Add the warehouse address to the list of servers in Git;
4. Create a new code file or copy the project file to the warehouse directory in the local warehouse directory;
5. If you do not set the user name and email, the first time to add code will be prompted to set, casual settings can be;
6. Select the file or folder you want to add, and enter the account password that is registered on GitHub when Add-->commit-->push,push;
7. If you need to remember the user name password, in the C:\Documents and settings\administrator\ directory there is a. gitconfig file, add the following two lines
[Credential]
Helper = Store
//--------------------------------------------------------------
Working directly with Git in studio:
1.check out Project form version Control->github
2. Fill in the username and password registered on GitHub and select clone
3.clone When you are finished, you are prompted to create a project, select No
4. In the main interface select Open an existing Android studio project, open the project
5. After opening, if the version control page does not appear, click on the following error prompt: The directory xxxxxx is under Git, and is not registered in the Settings. Based on cue point Click Add ROOT to Resolve
Git usage--