简体   繁体   English

暂存tig中的所有文件

[英]Stage all files in tig

In tig command line tool for git, you go to the status view and you press u to stage a file. 在git的tig命令行工具中,转到状态视图,然后按u暂存文件。 What I am curious about is how to perform that actions multiple time without repeating the word u . 我很好奇的是如何多次执行该动作而不重复单词u Is this possible to stage multiple files or all files with just one key combo? 是否可以仅使用一个键组合暂存多个文件或所有文件?

While it is not possible out of the box, you can configure it via your tigrc file. 虽然无法立即使用,但您可以通过tigrc文件进行配置。 As an example, assuming that while you are in the stage view, you want to map the A key to the git add -A bash command. 例如,假设您在舞台视图中时,想要将A键映射到git add -A bash命令。 Here is what you will need to add to your tigrc file: 这是您需要添加到tigrc文件中的内容:

bind status A @git add -A

The syntax is pretty straightforward, the @ flag just means that the command output will not be shown. 语法非常简单, @标志只是意味着将不显示命令输出。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM