I'm developing a tool that has 3 functions as follows:
I must use JGit to implement this tool. But I did not find a way to rename of the repository by using JGit.
Does anyone know how to use JGit to rename the repository?
答案 0 :(得分:1)
Git存储库本身没有名称,因此JGit不提供重命名API。
通常,存储库所在的最后一段用于在必要时为其命名。例如,/foo/bar/.git
中的存储库将被命名为bar
。
要重命名存储库,只需move its location by using the Java file API。