首页 > 代码库 > how to git

how to git

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