V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
lights
V2EX  ›  问与答

Windows 最好的 Git 命令行使用姿势是什么?

  •  
  •   lights · 2020-10-14 22:43:38 +08:00 · 1244 次点击
    这是一个创建于 1299 天前的主题,其中的信息可能已经有所发展或是发生改变。

    昨天提了一个 windows WSL2 下 git 使用体验的问题
    很感谢大家的回复,不折腾 WSL2 下的 git 了

    又随手搜索了一下 V 站关于 Git 命令行相关的关键字,发现大家用法还挺不一样
    GUI 情况就不说了,单说命令行的

    • git bash
    • cmder
    • powershell + 配置

    主要是 powershell + 配置的使用场景从未想到过,但感觉很骚气
    看到有人列举了这么些 powershell 的 git 模块
    https://github.com/dahlbyk/posh-git
    https://github.com/JanJoris/oh-my-posh
    https://github.com/chrisbenti/PS-Config

    不知有没有详细分享一下使用体验的,WSL+oh-my-zsh 虽好,但也总是有 eol 的问题,还挺烦

    3 条回复    2020-10-15 10:31:40 +08:00
    AndyAO
        1
    AndyAO  
       2020-10-15 09:14:05 +08:00
    在用 PowerShell+posh-git 使用 Git 命令行,并没发现有什么问题.
    yisany
        2
    yisany  
       2020-10-15 09:55:19 +08:00
    终端: Windows Terminal
    Shell: git bash
    组合使用
    ysc3839
        3
    ysc3839  
       2020-10-15 10:31:40 +08:00   ❤️ 1
    终端: ConEmu https://conemu.github.io/
    Shell: MSYS2 Bash

    Windows 自带的控制台功能太简陋了,所以选择功能强大的 ConEmu 。曾经用过一段时间 Windows Terminal,界面是挺好看的,但是功能还没赶上 ConEmu,所以没有继续使用了。
    不过 ConEmu 对一些使用 Unix PTY 的程序支持有问题,Windows Terminal 似乎没问题。
    不用 cmder 是因为 cmder 就是 ConEmu 再打包一些别的软件,我想要自己配置,而不是打包一堆给我。

    Shell 的话 cmd 太简陋,PowerShell 太复杂,许多时候需要敲很长的命令。Bash 功能够用且不复杂,还有开箱即用的 Git 自动补全。
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   3178 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 12:47 · PVG 20:47 · LAX 05:47 · JFK 08:47
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.