Table of Contents
clone一个repo
1 2 3 |
git clone [http://][username]@url/ip:/path/to/project project |
获取并且整合另外一个repos到本地repos refs
1 2 3 |
git pull [option] [remote] [branch] |
上传本地repo branch到remote branch
1 2 3 4 5 6 |
git push [option] [remote] [branch] [option] -f 当local和remote分支不是同一祖先时强制使用本地refs覆盖remote分支 |
获取remote的branch的更新
1 2 3 |
git fetch [remote] [branch] |
设置local branch的tracking remote branch
1 2 3 |
git branch --set-upstream-to=<remote>/<branch> [local branch] |