1. Common git commands
git branch 本地分支名
git remote add origin 你的新远程仓库地址
git checkout -b 本地分支名 origin/远程分支名
git branch --unset-upstream
git checkout -b 本地分支名
git push origin 分支名(或者地址默认master上面)
git remote set-url origin 你新的远程仓库地址
git remote rm origin
git remote add origin 你的新远程仓库地址
git branch
git branch -a
git branch -r
git status
git add .
git commit -m '注释'
git merge dev
git checkout dev
git remote show
git rm 文件名(包括路径)
git clone git://github.com/schacon/grit.git
git config --list
git log
git diff
git stash push
git stash pop
1. For the first time, you need to clone the remote branch:
git clone -b <指定分支名> <远程仓库地址>
git clone <远程仓库地址>
2. Create a new branch locally for project development
git checkout -b <新建分支名字>(dev
3. Push the new branch to the remote
git push -u origin <新建分支名字>(dev)
git remote push -u origin 新分支