随便记点常用git命令

随便记点,备忘

设置
git config –global user.name “Boatfucker”
git config –global user.email collection@boat.com
编辑器
git config –global core.editor emacs
克隆
git clone []
列出那些玩意
git config –list
初始化本地仓库:
git init
推送:
git push [] []
重写历史 –force或-f 设置默认上传流 –set-upstream或-u
检出分支:
git checkout
回退版本(修改HEAD指向):
git reset []
–mixed 仅回退commit和index,不回退file
–soft 仅回退commit
–hard 回退commit、index、file
撤销修改(会生成与修改相反commit):
git revert []
合并
git merge
–no-ff 强制不使用fast-forward merge

Donate
  • Copyright: Copyright is owned by the author. For commercial reprints, please contact the author for authorization. For non-commercial reprints, please indicate the source.

请我喝杯咖啡吧~

支付宝
微信