配置git
git config --global --edit
[core]
autocrlf = input
editor = vim
[user]
name = MasterMan
email = 542986819@qq.com
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
cm = commit -m
s = status
co = checkout
fe = fetch --all
br = branch -a
brd = branch -D
brod = push origin --delete
git clone xxxxx
git remote add upstream xxxx
git fetch --all
git checkout -b xxx
git rebase -i xxxxxxxxxxxxxxxxxxxxxxxx
git reset --hard xxxxxxxxxxxxxxxxxx
git push -f
暂存操作
git stash save xxxx
查看当前暂存的记录
git stash list
pop命令恢复,恢复后,暂存区域会删除当前的记录’
git stash pop stash@{index}
apply命令恢复,恢复后,暂存区域会保留当前的记录’
git stash apply stash@{index}
#删除某个暂存, 暂存记录保存在list内,需要通过list索引index取出恢复
git stash drop stash@{index}
#删除全部暂存
git stash clear
删除本地分支
git branch -D xxx
删除远端分支
git push origin --delete xxx