github start guide

Posted on Thu 03 January 2013 in it

最近因为启动了新的项目,正好有机会更新一下原有的技术框架,最近研究了Netty、MyBatis和最新发布的Spring3.2.0。写了一些有意思的demo很想和大家分享,github很火,趁着还没被墙,赶快用起来。 以下是学习记录,包括主要的操作和用eclipse提交的详细说明。

操作步骤介绍

  1. 注册免费帐号 open page https://github.com/signup/free
  2. 设置本地环境 refer to https://help.github.com/articles/set-up-git $ git config --global user.name twotwo $ git config --global user.email twotwo.li@gmail.com $ git config --list user.name=twotwo user.email=twotwo.li@gmail.com
  3. 提交代码的两种方法 3.1 Create a Repository/Commit to Local & Push to Remote Node(GitHub) refer to https://help.github.com/articles/create-a-repo git remote add origin https://github.com/twotwo/framework-java.git

Creates a remote named "origin" pointing at your GitHub repo

git push origin master

Sends your commits in the "master" branch to GitHub

关于remote add:建立一个叫做origin的外部节点 关于push:push 目标 源 3.2 Clone A Repository/fetch Upstream Node(GitHub) refer to https://help.github.com/articles/fork-a-repo 关于commit:建立项目快照 关于fetch和pull的差别:pull会进行fetch并于当前的工作区自动merge 4. Deleting a repository refer to https://help.github.com/articles/deleting-a-repository

用eclipse(EGit)提交代码的操作步骤

  1. Open Git Repository Exploring
  2. Clone a Git Repository and add the clone to this view
  3. Team->Share project: Select Git as repository type
  4. Team->Commet: Push the changes to upstream

浏览代码

猛击这里!