Distributing git configuration with the code

后端 未结 4 730
迷失自我
迷失自我 2020-11-22 03:48

In trying to standardise the platform for the developers, one of my needs would be to commit the .git/config so that everybody have the same CRLF config without

4条回答
  •  暖寄归人
    2020-11-22 04:45

    May be a better way to use the hardlink:

    In *nix or OS X system:

    ln .git/config git-config
    git add git-config
    git commit -m "Now tracking git config file"
    

    In Windows on NTFS-filesystem System:

    mklink /H git-config .git\config
    git add git-config
    git commit -m "Now tracking git config file"
    

    But we must remember that when cloning project to apply the settings to perform the reverse procedure:

    In *nix or OS X system:

    git clone FROM_PROJ_URL
    rm .git/config
    ln git-config .git\config
    

    In Windows on NTFS-filesystem System:

    git clone FROM_PROJ_URL
    del .git\config
    mklink /H .git\config git-config
    

提交回复
热议问题