{
"url": "ssh://git@github.com/xxx/xxx-ros.git",
"rev": "45ffc223ce4dbb08ab69d233b739cd919ddaeexx",
"sha256": "0b1l7269wjl4z6j4ry3dyh5lw92hnjprlygfj4j4ylx2aydxbxxx",
"private": true,
"fetchSubmodules": false,
"branch": "xxx/transition_xxx_related_changes"
}
第一步, 通过branch 名来获得rev hash
git rev-parse your_branch_name
第二步,在安装nix-prefetch-git 脚本后,利用脚本 来获取你git clone 地址里的这个分支的commit rev 所对应的sha256 hash
nix-prefetch-git ssh://git@github.com/xxx/xxx-ros.git --rev 45ffc223ce4dbb08ab69d233b739cd919ddaeexx
Initialized empty Git repository in /tmp/git-checkout-tmp-u4l8MD3e/xxx-ros-45ffc22/.git/
remote: Enumerating objects: 177, done.
remote: Counting objects: 100% (177/177), done