git分支的大写名称

时间:2018-07-25 13:23:07

标签: git git-config

在特定项目中,“功能”一词转为大写。

For example:
git checkout -b "feature/#123123-test"

the name of branch will:
FEATURE/#123123-teste

if I put:
git checkout -b "otherthing/#123123-test"

will:
otherthing/#123123-test

.gitconfig:

[filter "lfs"]
    smudge = git-lfs smudge -- %f
    process = git-lfs filter-process
    required = true
    clean = git-lfs clean -- %f
[user]
    name = Bruno
    email = *******@******.com.br

有人知道这里发生了什么吗?

1 个答案:

答案 0 :(得分:1)

在不区分大小写的文件系统上,例如Windows;

$ git commit --allow-empty -m "Init."
[master (root-commit) 69082bb] Init.

$ git checkout -b FEATURE/first
Switched to a new branch 'FEATURE/first'

$ git checkout -b feature/second
Switched to a new branch 'feature/second'

$ git branch
 FEATURE/first
 FEATURE/second
 master

您的分支存储为包含它们指向的提交哈希的文件和目录。当您创建“分支文件夹”时,它只会创建一次,并且始终具有该大小写。

.git/refs/heads中查看仓库的情况。