This article is Skylinelin original, reprint please indicate source!
First, Introduction
Now browsing the web about Git , basically using the command line (git Bash), the command line is very efficient, but with some complexity, now we see how to use as to project upload to GitHub.
Second, install Git
I'll show you how to install Git in the front, not much here.
git download link
Iii. How to configure in as
After the download installs Git, open as settings (settings), then we begin to configure git with the image
Fill in your GitHub account number and password, if not, register first
Iv. Creating a Git repository
We have now completed the configuration in as, and then we will look at how to create the warehouse.
- First create the local repository, here to explain that Git will first create a local repository, each commit will be submitted to the local repository, and then push the time to submit to the server
This time we can see the code turned red, indicating that the project was tracked by git
Ignore file
We know that when git Initializes a repository, it automatically generates a . Gitignore file, which is used to ignore files that are not added to the repository, generating a total of two . Gitignore files in our project. They are in the project root directory, and under the App folder, respectively. We can edit these files to indicate which files we need to ignore, but in general we choose the default as well, unless you need to make the appropriate modifications:
V. Add files to a git repository
- We now right-click on the root of the project to add (Ctrl+alt+a)
- Add after the file name becomes green, this is the representative has been added to the repository as a file, then you can Commit the file, use the shortcut key ctrl+k or select the project root right Git-->commit
Directory can bring up the commit window, as shown below, in which you select the file you want to submit, fill in the submitted information, in the Author text box can fill in the submission of the name of the operator, if not filled, will default is the user name of the GitHub account previously configured. As you can see, the file name changes back to the familiar white after the commit.
After the submission succeeds, you can use the shortcut key alt+9, or click the Version Control Tool button at the bottom of the screen to switch to the Log menu to view the log log as shown in:
Vi. uploading items to GitHub
- There's nothing to say, just look at the picture.
Upload successful
Android Quick implementation uploads items to GitHub