Git show all branches (but not stashes) in log

前端 未结 3 1782
孤城傲影
孤城傲影 2021-01-30 19:25

I have a Git alias that expands to:

git log --graph --oneline --all --decorate

According to man git log there are a couple of susp

3条回答
  •  一向
    一向 (楼主)
    2021-01-30 19:46

    My alias:

    [alias]
        l = log --oneline --decorate --graph --exclude=refs/stash
    

    In this case you will be able to use these forms without showing the stash:

    • git l for the current branch
    • git l feature234 for a specific branch
    • git l --all for the overall history

    From the manual:

    --exclude=

    Do not include refs matching that the next --all, --branches, --tags, --remotes, or --glob would otherwise consider.

提交回复
热议问题