单片机实施:Git

基本信息

链接: http: //git-scm.com/

许可证:GNU 通用公共许可证 v2

单片机网址

对于以下所有 URL,我们使用冒号 (:) 作为分隔符。如果您使用冒号作为变量之一(例如,windows 路径),则使用竖线 (|) 作为分隔符。在任何情况下,端口的分隔符都必须是冒号,因为这部分是在 git URL 规范中指定的。请参阅 man git-fetch。

scm:git:git://server_name[:port]/path_to_repository
scm:git:http://server_name[:port]/path_to_repository
scm:git:https://server_name[:port]/path_to_repository
scm:git:ssh://server_name[:port]/path_to_repository
scm:git:file://[hostname]/path_to_repository
  • 例子
    scm:git:git://github.com/path_to_repository
    scm:git:http://github.com/path_to_repository
    scm:git:https://github.com/path_to_repository
    scm:git:ssh://github.com/path_to_repository
    scm:git:file://localhost/path_to_repository
    

不同的获取和推送 URL

在某些情况下,必须使用不同的 URL 进行读取和写入操作。如果通过 http 协议执行例如 fetch,则可能会发生这种情况,但只能通过 ssh 写入存储库。在这种情况下,两个 URL 都可以写入developerConnection标记。获取 URL 必须以[fetch=]为前缀,推送 URL 必须以[push=]为前缀

  • 例子:
    <developerConnection>scm:git:[fetch=]http://mywebserver.org/path_to_repository[push=]ssh://username@otherserver:8898/~/repopath.git</developerConnection>
    

与分支机构合作

从 1.3 版本开始,我们假设上游仓库中的分支名称与当前本地分支的名称相同。因此,每当您调用必须访问上游存储库的 maven-scm 操作时,例如开始发布,您就应该在那个分支上。

换句话说:如果没有手动指定分支,每个 git-fetch、git-pull、git-push 等都将始终在上游存储库中的分支上工作,该分支与您当前的本地分支具有相同的分支名称

git push pushUrl currentBranch:currentBranch

提供者配置

提供程序配置在${user.home}/.scm/git-settings.xml 中定义。有关详细信息,请参阅参考指南