Github Git usage

/** Init **/
mkdir XX
cd ~/XX
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin https://github.com/YYY/XX.git
git push origin master

/** Fork **/
git clone https://github.com/YYY/XX.git
cd XX
git remote add upstream https://github.com/YYY/XX.git
git fetch upstream
git merge upstream/master

/** Update & commit **/ git fetch upstream git merge upstream/master // git pull upstream master git status git add -A git commit -m 'commit message' git push origin master

 

posted @ 2013-06-20 21:54  WillYan  阅读(272)  评论(0编辑  收藏  举报