之后,我们键-6ren">
sách gpt4 ăn đã đi

git - Làm cách nào để tránh gõ "git" ở đầu mỗi lệnh Git?

In lại 作者:IT王子 更新时间:2023-10-29 01:15:59 29 4
mua khóa gpt4 giày nike

我想知道是否有一种方法可以避免在每个 Git 命令的开头键入单词 git

如果有一种方法可以在打开命令提示符进入 “Git 模式” 后只使用一次 git 命令就好了。

Ví dụ:

git>

之后,我们键入的每个命令都默认解释为 Git 命令。

类似于我们使用 MySQL shell 编写数据库命令的方式:

mysql>

这将使我不必每天输入数百次 git

Để ý:tôi đang sử dụng git-bash , 在 Windows 上。

câu trả lời hay nhất

您可能想尝试 gitsh .来自他们的自述文件:

Các gitsh program is an interactive shell for git. From within gitsh you can issue any git command, even using your local aliases and configuration.

  • Git commands tend to come in groups. Avoid typing git over and over and over by running them in a dedicated git shell:
sh$ gitsh
gitsh% status
gitsh% add .
gitsh% commit -m "Ship it!"
gitsh% push
gitsh% ctrl-d
sh$

或者看看那里链接的其他项目:

  • git-sh - A customised bash shell with a Git prompt, aliases, and completion.
  • gitsh - A simple Git shell written in Perl.
  • repl - Wraps any program with subcommands in a REPL.

注意:我自己还没有用过。

关于git - 如何避免在每个 Git 命令的开头键入 "git"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56505000/

29 4 0
Đề xuất bài viết: C++:Linux平台上的线程同步场景
Đề xuất bài viết: github:服务器证书验证失败
Đề xuất bài viết: linux - 在 Mac OS 中查找可写文件
Đề xuất bài viết: git diff 与组合 --word-diff
Chứng chỉ ICP Bắc Kinh số 000000
Hợp tác quảng cáo: 1813099741@qq.com 6ren.com
Xem sitemap của VNExpress