Automatically show status after git add

后端 未结 4 1369
猫巷女王i
猫巷女王i 2021-01-02 03:03

My usual git workflow is


git add FILES
git status
git commit -m \"some remarks\"

where I need the git status

4条回答
  •  忘掉有多难
    2021-01-02 03:43

    Here's what I have using the answer at https://stackoverflow.com/a/26243454 and combining it with devnull's answer:

    [alias]
        sadd = !sh -c 'cd -- ${GIT_PREFIX:-.} && git add -- "$@" && git status' --
    

    This way you don't need to pass in the working directory manually.

提交回复
热议问题