Install Git
Open a shell page, enter
sudo apt-get install git-core
After pressing the Enter password, Git to complete the installation.
Configure Identity
git config --global user.name "Tony"
git config --global user.email "[email protected]"
Create a code repository
First go to the project folder, enter
git init
Complete the creation of the code repository.
Use ls -al command in the project directory you can view all files that contain hidden files, which .git folder is used to record all local git operations, if you want to delete a local warehouse, just delete this folder on the line a.
Submit native code
The method can submit code after the code repository to create finished, submit the code is very simple, just use the add command and commit it. add used to want to submit code to add in, but it is truly commit to do a commit.
Build.gradle add a single file, enter the command:
git add build.gradle
All files in directory will be added throughout the app, enter the command:
git add app
Add all the files at one time good, enter the command:
git add .
After you add the code, submit the code, enter the command:
git commit -m "First commit."
Note: In the commit command behind, must be submitted together with the description by the -m parameter. No description of the information submitted is considered to be illegal.