git版本更新

git commit之后输入commit log信息,保存退出,发现有以下错误:

git: 'interpret-trailers' is not a git command. See 'git --help'.
cannot insert change-id line in .git/COMMIT_EDITMSG

原因是git版本比较低,需要更新git

直接用命令更新git版本,办法如下:

sudo add-apt-repository ppa:git-core/ppa
sudo apt-get update
sudo apt-get install git

常见错误:

repo init -u ssh://leezs@10.20.30.40:29418/Android_S/rk3588-manifests -m Android12.xml

Downloading Repo source from http://mirrors.tuna.tsinghua.edu.cn/git/git-repo
remote: Enumerating objects: 7360, done.
remote: Counting objects: 100% (7360/7360), done.
remote: Compressing objects: 100% (3927/3927), done.
remote: Total 7360 (delta 4752), reused 5568 (delta 3359)
Receiving objects: 100% (7360/7360), 3.28 MiB | 4.51 MiB/s, done.
Resolving deltas: 100% (4752/4752), done.
Downloading manifest from ssh://fzli4@10.40.73.27:29418/Android_S/rk3588-manifests
Traceback (most recent call last):
  File "/home/leezs/rk3588s/.repo/repo/main.py", line 690, in <module>
    _Main(sys.argv[1:])
  File "/home/leezs/rk3588s/.repo/repo/main.py", line 666, in _Main
    result = run()
  File "/home/leezs/rk3588s/.repo/repo/main.py", line 659, in <lambda>
    run = lambda: repo._Run(name, gopts, argv) or 0
  File "/home/leezs/rk3588s/.repo/repo/main.py", line 311, in _Run
    result = cmd.Execute(copts, cargs)
  File "/home/leezs/rk3588s/.repo/repo/subcmds/init.py", line 559, in Execute
    self._SyncManifest(opt)
  File "/home/leezs/rk3588s/.repo/repo/subcmds/init.py", line 213, in _SyncManifest
    default_branch = m.ResolveRemoteHead()
  File "/home/leezs/rk3588s/.repo/repo/project.py", line 1983, in ResolveRemoteHead
    output = self.bare_git.ls_remote('-q', '--symref', '--exit-code', name, 'HEAD')
  File "/home/leezs/rk3588s/.repo/repo/project.py", line 3143, in runner
    (self._project.name, name, p.stderr))
error.GitError: manifests ls-remote: usage: git ls-remote [--heads] [--tags]  [-u <exec> | --upload-pack <exec>]
                     [-q|--quiet] [--exit-code] [--get-url] [<repository> [<refs>...]]

解决办法:

是因为没加分支名,需要二次repo init,或者需要更新git版本

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

leezs1425

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值