【问题标题】:How can navigate one level back at the git interactive staging (add) command如何在 git 交互式暂存(添加)命令中导航回一级
【发布时间】:2022-01-23 06:13:03
【问题描述】:

在运行交互式暂存 git 命令$ git add -i 并选择其中一个选项(例如“更新”)后,我不知道如何回到根级别选择另一个选项。

是否有任何键盘快捷键或替代方法,而不是仅使用“ctrl + c”然后再次运行代码$ git add -i

【问题讨论】:

    标签: git staging git-add git-stage git-index


    【解决方案1】:

    如果您在交互式添加时按?,您可以看到该帮助:

    Prompt help:
    1          - select a single item
    3-5        - select a range of items
    2-3,6-9    - select multiple ranges
    foo        - select item based on unique prefix
    -...       - unselect specified items
    *          - choose all items
               - (empty) finish selecting
    

    所以基本上只需按回车,它应该返回主选择

    【讨论】:

    • 哦,谢谢。真的很有帮助,正是我需要的!!!!!!!但我能问一下你是从哪里找到解决方案的吗?
    • 通过反复试验 ;) 我只是运行git add -i,选择更新,尝试helphelp? 没有运气,然后尝试?
    • 哦,太好了,谢谢
    猜你喜欢
    • 1970-01-01
    • 2012-01-07
    • 1970-01-01
    • 2017-10-31
    • 2020-03-12
    • 2015-02-12
    • 2019-06-22
    • 2013-02-21
    相关资源
    最近更新 更多