1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
| git init xxx
git clone
git remote -v origin https://github.com/joinik/xinjingzixun_2020 (fetch) origin https://github.com/joinik/xinjingzixun_2020 (push) ======== ========
git remote remove origin $ git remote -v $ git remote add [name] [url] $ git remote rm [name] $ git remote set-url --push [name] [newUrl] $ git pull [remoteName] [localBranchName] $ git push [remoteName] [localBranchName]
git branch git branch -r git branch [name] -- 注意新分支创建后, 不会切换到新分支 git branch -a git checkout [name] git checkout -b [name] git branch -d
$ git branch --set-upstream [branch] [remote-branch]
$ git merge [branch]
$ git cherry-pick [commit]
$ git push origin --delete [branch-name] $ git branch -dr [remote/branch]
|