git remote add upstream __FORK_URL__
git fetch upstream
git checkout master
git merge upstream/master
或者
git rebase upstream/master
git push origin --delete BRANCH_NAME
git branch <new-branch-name> <tag-name>
git clone url.git new_name
git reset --hard ID
git reset ID
git commit --allow-empty --signoff -m "rebuild img" && git push
git reset --hard ID
git push -f
git commit --amend
git commit --amend --signoff
git reset --soft HEAD^
git push origin --delete br-name
``
- 撤销上次add
git reset HEAD git revert HEAD
- 基于别人的pr修改
git commit –amend
- merge某次提交
git cherry-pick ID
- 查看修改的文件列表
git whatchanged
- 配置github
ssh-keygen -t rsa -b 4096 -C “ssli@redhat.com” cat ~/.ssh/id_rsa.pub git config –global user.email “ssli@redhat.com” git config –global user.name “Song Song Li” git config –global color.ui auto
- 设置代理
git config –global http.proxy http://proxyUsername:proxyPassword@proxy.server.com:port ```
:) 未完待续……
LEo at 00:12