git stash 命令确实有点好用

2022-08-26 13:36:59 +08:00
 wdssmq

下边是我定义的命令别名,虽然还是记不住;

所以每次还要先执行下code ~/.gitconfig打开配置文件照着敲;

[alias]
    # status
    s   = status
    ss  = status --short --branch

    # stash
    sh  = stash
    shp = stash pop
    shl = stash list
    shs = stash save
    sha = stash apply
    std = stash drop

    # branch
    br  = branch
    bra = branch -a
    brm = branch -m
    co  = checkout
    cob = checkout -b
    sw  = switch
    swc = switch -c

    # remote
    ra  = remote add
    rao = remote add origin
    ru  = remote set-url
    ruo = remote set-url origin
    # re  = remote
    rev = remote -v

    # fetch
    fe  = fetch
    fep = fetch -p
    fo  = fetch origin
    fop = fetch origin -p

    # merge
    mr  = merge
    mnc = merge --no-commit
    # msq = merge --squash

    # commit
    ci  = commit
    cim = commit -m

「折腾」 git 及 docker 命令快捷输入_电脑网络_沉冰浮水:

https://www.wdssmq.com/post/20171130103.html

↑ 原文链接,后续可能会修改或补充

4056 次点击
所在节点    git
24 条回复
whenov
2022-08-26 17:23:16 +08:00
可惜不能只存 unstaged 区域的改动(--keep-index 也不行)
yulang
2022-08-26 22:28:20 +08:00
alias.amend=commit --amend --no-edit
alias.glg=log --oneline --decorate --all --graph
alias.refresh=pull --rebase --autostash upstream HEAD
alias.discard=reset --hard HEAD
gamesover
2022-08-27 13:51:25 +08:00
如果 lz 用 vs code 的话,推荐一款插件 gitgraph

用了之后,你就从此告别自定义快捷键了
gamesover
2022-08-27 13:52:13 +08:00

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/875573

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX