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版本