The importance of git is learned through a chapter, because you want to get source code for open source, you have to use Git, and the Linux kernel is completely managed by git. Git is managing the source code, which needs to be installed before it can be used, and the command is
(1) apt-get install Git-core
(2) apt-get install Git-doc git-svn git-email Git-gui gitk
The second statement is the GIT command installed.
There are three ways to view a document under Linux:
1. Use man directly to view the help document for the specified command, which can be exited by Q after the query is completed
2. View the specified document Usage command as text:
(1) Git help <sub-command>
(2) Git get git-(plus the command that needs to be queried)
3. View the commands used in the HTML form of the document:
Git help-w git-checkout
The book shows a complete example of how large git can be, including how to create a repository, submit source code, create a branch, upload source code to a remote server, and get source code from a distant server.
1. To create a repository, the repository of Git and other software is organized in a very different way, which is divided into the local repository and the remote repository, and uses the remote repository in the case of networking.
2. Using Git to manage files, first submit the file to the local repository, then execute the command to enter a directory, create a. txt file in this directory, add the file to the index of the local repository, and submit its. txt file to the repository.
3.Git provides the concept of branching, but before you create a branch, you need to know which local branches the current version contains.
(1) View command: Git branch
(2) New branch: Git branch new-branch
(3) Delete the newly created branch: Git branch-d new-branch
(4) Switch local branch: git checkout new-branch
4. Then referred to the remote, talking about the git hosting server, the first time to listen to the term, the book uses GitHub to host the newly created. txt file, before using the Http://github.com/signup/free page to register a free user, Then create an open source project by prompting
5. Then to upload the source code to GitHub, the upload requires SSH verification, to use the command ssh-keygen-t rsa-c "", the double quotation mark is written in the registered mailbox number, and then generate a key file and a public key file, after the file exists, need to back up, followed by a hint, However, Ubuntu successfully completed the above operation still cannot pass the test, need to add RSA identity to proxy authentication. You can see the uploaded files on the GitHub page, and you can find the URI for uploading.
6. Source code can be downloaded from github
(1) Download the entire project: Git clone [email protected]: Androidguy/helloword.git
The last Helloword here is an example that can be changed according to your needs
(2) Get the latest content for a branch: Git pull Origin Master
http://www.cnblogs.com/xxyue/
Android Reading notes three