[Linux] Github的使用经验

ssh-keygen -t rsa -C "linkscue@gmail.com"
git config --global user.name "scue"
git config --global user.email linkscue@gmail.com
git init
git add *
git commit -m "message"
git remote add origin git@github.com/scue:repostory

 git 拉取其他remote上的分支

git remote add cm10.1 git://github.com/CyanogenMod/android_hardware_samsung.git
git fetch cm10.1
git checkout remotes/cm10.1/cm-10.1
git branch cm10.1 #创建了一个新分支(把远程的仓库某分支合并至本地仓库的某分支上了)

 git 合并分支时不分支显示过去的commit

git checkout [master branch]
git merge --squash [dev branch]
git commit -am "new commit"

 git 远程/本地操作

git remote add [remote name] [remote url]
git push [remote name] [local_branch]:[remote_branch]

 

 

posted @ 2013-03-01 16:15  scue  阅读(330)  评论(1)    收藏  举报