This is an old revision of the document!


Annotated ~/.gitconfig

This is my (Jan's) annotated ~/.gitconfig file which contains settings that are useful when you are working with sip-router git repositories. Major features of the configuration file:

  • References are not packed during git gc, this makes the repository slightly easier to use from shell.
  • Configuration for git-send-email, the tool is configured to use sendmail on local machine and sets the envelope sender address explicitly.
  • Short aliases for most often used git commands.
  • Remote branches for all sip-router git repositories.
[user]
        name = <Your Name>
        email = <your email address>

[core]
        # Exclude files ending with ~ in all repositories, these are backup files
        # produced by emacs and they hold the original version of the file
        # retrieved from the vcs.
        excludesfile = *~

[format]
        # Add the patch number and the total number of patches in the series to
        # the subject of the patch email if more than one patch is being produced.
        numbered = auto

[gc]
        # Do not remove references under .git/refs/heads and .git/refs/tags when
        # git gc is run. The default behavior of git-gc is to pack the references
        # and store the packed references in .git/packed-refs. I personally find
        # the references kept in files under .git/refs very useful, they make the
        # retrieval of branch or tag info very easy from a shell script so I do
        # not want to have them packed when I run git-gc.
        packrefs = 0

[sendemail]
        # Do not add the e-mail address from Signed-off-by and CC headers to the
        # list of recipients. The default setting would send me a copy of every
        # patch I sign off--which I do not want.
        suppressfrom = true

        # Set the envelope sender address explicitly. I configured my local
        # postfix server to select the outbound SMTP server based on the sender
        # address in the envelope so it is important that we have a correct email
        # address there.
        envelopesender = <your email address>

[alias]
        ci = commit
        co = checkout
        f  = fetch
        s = status
        b = branch
        d = diff
        a = add
        l = log

[color]
        branch = auto
        diff = auto
        status = auto

[http]
        # The CA certificate used to verify servers in sip-router.org domain, this
        # is useful if you pull from, for example, https://git.sip-router.org.
        # Uncomment the following configuration option if you have the CA certificate
        # installed.
        #sslCAInfo = /etc/ssl/certs/sip-router.org_CA.pem

[merge]
        # Include the summary of merged commits into all newly created merge
        # commits. The newly created merge commit will contain a one-line summary
        # of every (well, most) merged commits.
        log = true

        # Show merge statistics after merge.
        stat = true

[branch]
        # When creating a new branch off a remote branch, always set it up to
        # track the remote branch so that we can pull from there.
        autoseupmerge = always

# Here comes a list of remote repositories that I frequently use. They are
# listed here in ~/.gitconfig so that I do not have to add them every time I
# create a new local git repository.

# This is the main sip-router git repository. The configuration below
# downloads all tags just like branches and stores them under refs/tags/sr/
# subdirectory. This is necessary because the contents of this repository
# originates from the SER cvs repository. If you pull both the sip-router
# repository and the SER cvs repository (through its git mirror) into a local
# git repository then they might generate conflicting tags because they both
# contain the same tag names (but pointing to different commit ids).
[remote "sr"]
        url = git://git.sip-router.org/sip-router
        fetch = +refs/heads/*:refs/remotes/sr/*
        fetch = refs/tags/*:refs/tags/sr/*
        tagopt = --no-tags

# This is the git import of the cvs repository of SER. See the description of
# above for an explanation of why do we have to download tags manually and
# store them in a subdirectory.
[remote "cvs"]
        url = git://git.sip-router.org/ser
        fetch = +refs/heads/*:refs/remotes/cvs/*
        fetch = refs/tags/*:refs/tags/cvs/*
        tagopt = --no-tags

# This is the git import of the kamailio svn repository. This repository is
# read only and is only available through http or https. Make sure you have
# installed the CA certificate for sip-router.org domain if you want to use
# https transport. We are using unofficial CA certificates.
[remote "km"]
        url = http://git.sip-router.org/kamailio
        fetch = +refs/heads/*:refs/remotes/km/*
        fetch = refs/tags/*:refs/tags/km/*
        tagopt = --no-tags

# This is the git import of the opensips svn repository. This repository is
# read only and is only available through http or https. Make sure you have
# installed the CA certificate for sip-router.org domain if you want to use
# https transport. We are using unofficial CA certificates.
[remote "os"]
        url = http://git.sip-router.org/opensips
        fetch = +refs/heads/*:refs/remotes/os/*
        fetch = refs/tags/*:refs/tags/os/*
        tagopt = --no-tags

Navigation

Wiki

Other

QR Code
QR Code git:gitconfig (generated for current page)