我有一个git项目,其中包含几个子模块。 从现在到一年前,已经移动了几个子模块-甚至其中的一些子模块也已在目录级别下移。另一个从一个URL移到另一个URL和位置位置。 Git不接受此类更改:)
当我有了git并运行elemIndexBy :: (a -> Boolean) -> [a] -> Maybe Int
elemIndexBy fun list = go list 0
where go [] _ = Nothing
go (x:xs) ix
| fun x = Just ix
| otherwise = go xs $ succ ix
elemIndexBy ((5 ==) . head) [[1, 5], [2, 4], [3, 3], [4, 2], [5, 1]]
> 4
时-我就无法运行
git submodule update --init
或者我得到
$ git checkout OLDSHA
fatal: not a git repository: sub/depdir/../../.git/modules/sub/depdir
如果我从头克隆git,请运行fatal: could not get a repository handle for submodule 'sub/depdir'
-然后运行git checkout OLDSHA
,没问题。
然后我的问题:
git submodule update --init
,这实际上使我回到了git submodule update --init
之后的收获注意;这不是要摆脱我的子模块。问题是启用我的使git bisect更有效地跨这些更改运行,而不必从头开始重新克隆。