初始化
1 2 3 4 5 6 7 8 9 10 11 12
| EMAIL=jianghuifr@outlook.com USERNAME=jianghui
ssh-keygen -t rsa -C $EMAIL
cat $HOME/.ssh/id_rsa.pub
git config --global user.email $EMAIL git config --global user.name $USERNAME
|
Proxy
1 2 3 4 5
| git config --global http.https://github.com.proxy $HTTP_PROXY git config --global https.https://github.com.proxy $HTTPS_PROXY
git config --global --unset http.proxy git config --global --unset https.proxy
|
Reset commit author
https://www.cnblogs.com/651434092qq/p/11015901.html
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| EMAIL=email@outlook.com USERNAME=username
git config --global user.email $EMAIL git config --global user.name $USERNAME
git rebase -i HEAD~3
git commit --amend --reset-author
git log
git rebase --continue
|
Transfer repository
1 2 3
| git clone --bare https://gitee.com/mygit-demo/test.git cd test.git git push --mirror https://gitee.com/mygit-demo/git-demo.git
|
Tag
1 2 3 4 5 6 7 8 9 10
| git tag **v0.1.0**
git tag -d **v0.1.0**
git push origin :refs/tags/**v0.1.0** Commit without git-hooks git commit . -m "quick fix" --no-verify
|
Rebase first commit
推送本地到远程新分支
1
| git push origin master:new_branch_name
|