echo "# my-test" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin [email protected]:BestDingSheng/my-test.git
git push -u origin main
#
git remote add origin [email protected]:BestDingSheng/my-test.git
git branch -M main
git push -u origin main
// ~/.gitconfig
[alias]
co = checkout
ci = commit
st = status
pl = pull
ps = push
dt = difftool
l = log --stat
cp = cherry-pick
ca = commit -a
b = branch
pso = push origin
plo = pull origin
cm = commit -m
gst = git status
gd = git diff
gl = git pull
gp = git push
glo = git pull origin
gpo = git push origin
gcm = git common -m
gc = git checkout
gcm = git checkout master
gcd = git checkout develop
gb = git branch
ga = git add .
- git stash save 'message'
- git stash pop 弹出最近一次 stash 并且删除
- git stash apply 弹出最近一次 stash 不删除 stash
- git stash list 查看当前 stash
- git stash save -u '暂存 未被跟踪的文件'
- git stash save -a '暂存 git 工作区 所有修改的文件'
- git stash 用法总结