gitsh程序是git的交互式shell

网友投稿 799 2022-10-18

gitsh程序是git的交互式shell

gitsh程序是git的交互式shell

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

For a quick introduction to gitsh, watch our video on Upcase. For further documentation, you can view the man page by running man gitsh in your terminal.

Why should you use gitsh?

Git commands tend to come in groups. Avoid typing git over and over and over by running them in a dedicated git shell: sh$ gitshgitsh% statusgitsh% add .gitsh% commit -m "Ship it!"gitsh% pushgitsh% ctrl-dsh$ Hit return with no command to run git status (change this command by setting gitsh.defaultCommand via git config; remember it will be prefixed with git ), saving even more typing: gitsh% ⏎# On branch masternothing to commit, working directory cleangitsh% Easily execute shell commands: gitsh% !echo Hello worldHello worldgitsh% Combine commands with &&, ||, and ;: gitsh% commit && push Make temporary modifications to your git configuration with gitsh config variables. These changes only affect git commands issued in this gitsh session and are forgotten when you exit, just like shell environment variables. gitsh% :set user.name 'George Brocklehurst and Mike Burns'gitsh% :set user.email support+george+mike@thoughtbot.comgitsh% commit -m 'We are pair programming' Access information about your repository with magic variables like $_rebase_base, $_merge_base and $_prior. gitsh% rebase masterCONFLICT (content): Merge conflict in db/schema.rbgitsh% checkout $_rebase_base -- db/schemagitsh% !rake db:schema:load db:migrate Tab completion for git commands, aliases, and branches without modifying your shell settings, and without any extra setup for aliases and third party git commands. Information about the state of your git repository in the prompt, without modifying your shell settings. This includes the name of the current HEAD, and a colour and sigil to indicate the status. It works with hub and gh: sh$ gitsh --git $(which gh)gitsh% pull-request

Installing gitsh

macOS, via Homebrew: brew tap thoughtbot/formulaebrew install gitsh Arch Linux: https://github.com/thoughtbot/gitsh/blob/master/arch/PKGBUILD OpenBSD -current: sudo pkg_add gitsh

See the installation guide for install instructions for other operating systems.

Contributing to gitsh

Pull requests are very welcome. See the contributing guide for more details.

Similar projects

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.

License

gitsh is Copyright © 2016 Mike Burns, George Brocklehurst, and thoughtbot. It is free software, and may be redistributed under the terms specified in the LICENSE file.

About thoughtbot

Created, maintained and funded by thoughtbot. The names and logos for thoughtbot are trademarks of thoughtbot, inc.

We love open source software! See our other projects. We are available for hire.

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:2022最新iOS打包、发布与证书体系详解
下一篇:Mybatis foreach用法解析
相关文章

 发表评论

暂时没有评论,来抢沙发吧~