go get


This is a readme file!!!!!!!!!!!!!!

2012-09-19 18:50



$ git config ""   #最好是github帐号
$ git config ""  #与github邮件地址相同
$ git commit --amend --reset-author -C HEAD

$ git log --pretty=fuller

$ git init
$ touch README
$ git add README
$ git commit -m 'first commit'#本地提交

$ git remote add origin  # Creates a remote named "origin" pointing at your GitHub repo
#在本地的  .git/refs/remotes/和.git/logs/refs/remotes/存在origin目录
$ git push origin master #也可以 git push,必要时git push -f



$ git checkout -b 新分支名称   #等价于 git branch 新分支名称 + git checkout 新分支名称
$ git add file #添加一个文件,不是必须的
$ git commit -m "add hello1 for mark."
$ git push -u origin 新分支名称    #提交;origin是先前仓库名字

>>git clone git clone
>>cd Gallery
>> git branch -a 
>>git checkout ics-mr0-release(or  remotes/origin/ics-mr0-release ,just example) 
>> gitk --all &
(refence :
$ git branch -r
$ git ls-remote
$ git branch -D 分支名   #删除分支
$ git push origin :分支名 #删除远程分支(不能是缺省的分支)

$git clone git clone
$cd Gallery
$git branch -a
$git checkout 分支
$gitk --all &

$ git remote add upstream   # Assigns the original repo to a remote called "upstream"

$ git fetch upstream    # Pulls in changes not present in your local repository, without modifying your files

$ git fetch upstream   # Fetches any new changes from the original repo

$ git merge upstream/master   # Merges any changes fetched into your working files

$ git pull origin master

We recommend that every repository has a README, LICENSE, and .gitignore

Create a new repository on the command line

git init
git add
git commit -m "first commit"
git remote add origin
git push -u origin master
Push an existing repository from the command line

git remote add origin
git push -u origin master

git init
git remote add origin

If you generated a project page, fetch and check out the new branch:

$ cd repo
$ git fetch origin
$ git checkout gh-pages

如果是user pages,则不会有gh-pages分支,直接pull
If you generated a user page, the page code lives on the master branch instead of the gh-pages branch, so just check out master and then pull!

$ cd repo
$ git checkout master
$ git pull origin master


# 创建文件
touch _config.yml {index,about,404}.html
# 创建目录
mkdir _{includes,layouts,posts,site} css img js
vim -p {index,about,404}.html