Open Source Project GitHub

Source: Internet
Author: User
Tags ssh access using git version control system

GitHub

Teach you how to join the open source world of GitHub!

Http://www.open-open.com/lib/view/open1396580186465.html

How do I find great open source projects on Github?

Https://www.oschina.net/news/75674/how-to-find-good-opensource-object

Https://github.com/blog/2289-publishing-with-github-pages-now-as-easy-as-1-2-3

How does GitHub use Ubuntu

1, git installation I use Ubuntu 10.04, by default, Ubuntu is not installed, so first need to do git installation in the system. sudo apt-get install Git-core when the installation is complete, you can see the relevant commands by entering GIT in the terminal. If you just need to use git to manage your local code, you can use it now. If you need to combine with a project on GitHub, there are other things to do.

2, GitHub account application if you just need to copy the code of interest on GitHub to the local, their own modifications to use, and do not intend to share the publication, in fact, do not apply for the account is not related, just need git clone code to local can. This article does not discuss this method, after all, using GitHub is for the purpose of open source. First go to github.com to register an account, the specific registration process will not repeat. 3, create a local folder, and then do some global variables initialization git config--global user.name = "username or user id" git config--global user.email = "Mailbox" These two options will be used in the future Automatically added to the code in the process. 4. Create a public key for authentication This is a more complex and confusing place for most people, because git accesses the repository through SSH, so you need to create a validation file locally. Use command: ssh-keygen-c ' you email [email protected] '-t RSA will establish the corresponding key file under the user directory ~/.ssh/can use Ssh-v [email protected] command to test whether the link is unblocked 5, upload the public key in the Github.com interface Select Account Settings in the upper-right corner, and then select SSH to the Keys, select New Add. Title can be arbitrarily named, the content of Key is copied from ~/.ssh/id_rsa.pub content, after completion, you can then use Ssh-v [email protected] to test. See the following information to indicate that the validation was successful.

Here, we can also use GitHub to manage our projects and participate in open source work, which is broadly divided into three ways. Managing your own projects This is where you have some code locally, and you need to use GitHub to manage your own projects, and you can follow the steps below. 1, the establishment of the warehouse in the need to set up a project folder, using GIT init to build the warehouse. When you are finished, you can see that there is one more. Git hidden directory in the file home. 2. Add files using git Add. To make the initial file additions. Over here. Indicates that all the files under the folder are added, and we can also specify the file to be added. 3, submit the file using git-m commit-m ' comment ' submission, you can submit the content of the edits. You can see some of the status of the project through Git show. This is the code that has been managed locally, but the local administration does not fully demonstrate the benefits of git. Using GitHub to host your own project 1, if you need to host your project on github.com, you first need to create a project. After selecting Create New Repository in Dashboard and filling in the relevant information, the project is created successfully. 2, after, there will be a reminder of how to upload, as already very detailed.

Fork someone else's project mentioned earlier, if just download the use of other people's code, through the Git clone can be, of course, the premise of cloning is that the project must be public, private projects are no way. If you need to participate, you can fork and then merge the way. 1, first need to go to their own interests in the project to fork,fork out a branch of their own. After fork, you can generally see an SSH access address. For example: [email protected]:cocowool/userguide.git 2, copy code using git clone [email protected]:cocowool/userguide.git userguide You can copy the code to the local Userguide folder 3, make your own changes, and then request the original author to merge git pull person master

Here is an introduction to some of the more useful commands:   # Create a repository git init # After each modification, you can save the changes to the stage (snapshot/index) git add <modified files> # Modify a large number of files to use the next This command is bulk-stored in git Add. # Commit the content in the snapshot/index to the repository using commit git commit-m "MSG" # can also be git add with git commit with a command to complete git commit-a-M "MSG" # to the local git file with GitHub ( Sync git push # on remote) git pull on GitHub (remote) git file with local sync (i.e. update the local side of the repo). For example, the pull instruction actually contains the fetch (copy the changes back) and merge (merge) operation git pull git ://github.com/tom/test.git   # Another version control system branch function is also very interesting, if you modify the bug, but also add new features, you can fork out a branch: A special fix bug, A special addition to the new feature, wait until the stability of merge merged git branch Bug_fix # Build branch, named Bug_fix git checkout bug_fix # switch to bug_fix git checkout master #切换到 Main repo git merge bug_fix #把bug_fix这个branch和现在的branch合并    # If you have remote branch, want to view and checkout git branch-r # view remote B Ranch git checkout-b bug_fix_local bug_fix_remote #把本地端切换为远程的bug_fix_remote Branch and named bug_fix_local   # There are other tools to view the repo status git log #可以查看每次commit的改变 git diff #可以查看最近一次改变的内容, plus parameters to see other changes and compare git show #可以看某次的变更    # If you want to know The status of the current working tree, you can enter the git status

Open Source project GitHub

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.