V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
hatcloud
V2EX  ›  问与答

「git commit -s」命令使用出错

  •  
  •   hatcloud · Oct 24, 2016 · 2382 views
    This topic created in 3473 days ago, the information mentioned may be changed or developed.

    今天我在使用「 git commit -s 」命令的时候总是会报错,具体报错如下图片所示

    其他命令如「 git status 」「 git commit -m 」「 git add 」等命令都没有问题

    在搜索半天无果后来求助各位,大家可以提出可能出错的地方让我去排错看看。假如需要更多信息的话也可以提出我会贴出来给你。

    谢谢

    5 replies    2016-10-24 17:28:53 +08:00
    skydiver
        1
    skydiver  
       Oct 24, 2016   ❤️ 1
    git commit -s -m "test"
    xmgit
        2
    xmgit  
       Oct 24, 2016   ❤️ 1
    man git-commit
    vincentxue
        3
    vincentxue  
       Oct 24, 2016
    1 楼正解,要么加 -m ,要么 -s 改为 -m 。

    但是楼主你为什么要用 -s ?一般是不需要的。
    hatcloud
        4
    hatcloud  
    OP
       Oct 24, 2016
    @vincentxue
    @Bardon
    @skydiver 我刚加入一家公司,同一格式吧

    是我犯蠢了,问题应该修改为我使用「 git commit -s 」后会打开编辑器,在我输入说明后并且「:wq 」退出编辑器后,这个 commit 操作并没有生效
    hatcloud
        5
    hatcloud  
    OP
       Oct 24, 2016
    @vincentxue 为了统一格式
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5775 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 06:40 · PVG 14:40 · LAX 23:40 · JFK 02:40
    ♥ Do have faith in what you're doing.