git fetch origin && git reset –hard origin/mastergit
git branch -a
git branch -rssh
git push origin master -ffetch
git revert -m 1 xxxxurl
git rebase –interactive ID^
將須要修改的記錄的 pick 改爲 edit
執行更改
git commit –all –amend
git rebase –continuerem
修改 ~/.ssh/config團隊協作
Host bitbucket.org
HostName bitbucket.org
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
User gitit
Host bitbucket.org-key2
HostName bitbucket.org
IdentityFile ~/.ssh/key2_id_rsa
User gitio
修改 .git/configast
[remote 「origin」]
url = git@bitbucket.org-key2:XXXX/yyyy.git
fetch = +refs/heads/:refs/remotes/origin/stream
git remote rename origin upstream
git remote add origin URL_TO_GITHUB_REPO
git push origin master
git pull upstream master && git push origin master
git reset –soft HEAD~1