zoukankan      html  css  js  c++  java
  • cat .git/config查看远端服务器信息(git的配置信息:远端服务器连接信息)

    本地git库中,查找其连接的远端服务器信息:

       每个git库都会有一个配置信息文件.git/config。

       cat .git/config,可以看到信息如下:

    [core]
            repositoryformatversion = 0
            filemode = true
            bare = false
            logallrefupdates = true
    [remote "origin"]
            url = git@repo.XXX.com:aaa
            fetch = +refs/heads/*:refs/remotes/origin/*
    [branch "master"]
            remote = origin
            merge = refs/heads/master
    [branch "waterforest"]
            remote = origin
            merge = refs/heads/waterforest
    ~

    可以看到连接远端服务器的信息。

    git安装后,就可以clone远端分支到本地。从远端拉倒本地后,本地git库默认构建.git文件目录。保存基本信息,如连接信息。全的git在那

    .git/目录下有很多文件,都是git库相关的信息:

     branches
     config
    description
    FETCH_HEAD
    HEAD
     hooks
    index
    info
     logs
     objects
     ORIG_HEAD
     packed-refs
     refs

    存放着各种信息。

    如果只在本地创建仓库,那么.git/config文件只有这么几行:

    1. <SPANstyle="FONT-SIZE: 16px">[core]
    2. repositoryformatversion = 0
    3. filemode = true
    4. bare = false
    5. logalrefupdates =true</SPAN>.

     

    如果这个仓库通过git remote add origin git@git_i5:nexus/android_4_0.git 添加到远程服务器git_i5的仓库,那么这个文件会多出下面几行:

    1. <SPANstyle="FONT-SIZE: 16px">[remote "origin"]
    2. fetch = +refs/heads/*:refs/remotes/origin/*
    3. url = git@git_i5:nexus/android_4_0.git</SPAN>

     

  • 相关阅读:
    闭包
    函数进阶2
    文档翻译 Python 2.7.x和Python 3.x之间的主要区别(包括示例)
    Deep Learn 关于单维度模型的多维输出
    Deep Learning 名词解释
    Deep Learning 激活函数
    Deep Learning 归一化、标准化
    Deep Learning 梯度下降
    Deep Learning 循环神经网络
    Deep Learning BP反向传播
  • 原文地址:https://www.cnblogs.com/cl1024cl/p/6205479.html
Copyright © 2011-2022 走看看