码迷,mamicode.com
首页 > 其他好文 > 详细

how to git

时间:2016-12-03 00:49:38      阅读:157      评论:0      收藏:0      [点我收藏+]

标签:download   readme.md   git add   add   oca   first   head   mint   base   

git init #local branch,fail with github
git add readme.md
git commit -m "first commit"
git remote add origin https://github.com/cuthead/cuthead.github.io.git
git push -u origin master #-u argument for default remote server
git config --global user.email "cuthead@icloud.com"
git config --global user.name "cuthead"
git clone https://github.com/cuthead/cuthead.github.io.git #the only way to use github
git add -a #-a argument doesn‘t work
git diff #show difference between recent git snapshot commit
git commit -m "update git information" #must have -m argument
git push
git config --global push.default simple #upload one branch
git config --global push.default matching #upload all branch
git push --all origin
gitk
git push
git commit -m "update git again" --amend #modify commit messege
git rebase origin/master #return to default branch in fork
git branch -r #list github
git branch -a #list github and local
git pull #equal git merge when using github
git fetch #do nothing when using github
git remote #list github
git merge #create and switch to a new branch in fork but not visible
chown liujianwei -R cuthead.github.io
chown liujianwei -R .git

how to blog on github.com
download desktop.github.com
login github.com,creat cuthead.github.io repository
git clone https://github.com/cuthead/cuthead.github.io.git
cd ~/cuthead.github.io
git config --global user.email "cuthead@qq.com"
git config --global user.name "cuthead"
git add -A
git commit -m "update"
git push
wait for several mintues

how to blog on coding.net
git config --global user.email "cuthead@qq.com"
git config --global push.default simple
git clone https://git.coding.net/cuthead/cuthead.git
git pull origin coding-pages
git checkout -b coding-pages
git add -A
git commit -m "update"
git push -f --set-upstream origin coding-pages

how to git

标签:download   readme.md   git add   add   oca   first   head   mint   base   

原文地址:http://www.cnblogs.com/cuthead/p/6127543.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!