Git Alias not working in worktree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear Git User-group,

I am having a setup where I use worktrees and I was now experimenting with adding git aliases to work more efficiently with the commands.
However I found that obviously it does not seem to work like I would like to have it:

My intention is to have a ".gitconfig" file as part of the repo so that all developers can easily get to the same configuration that was setup and also to have the config tracked as part of the repo.
We are using Git for Windows v2.28 and also git 2.28 on Linux.

I printed my config from my windows machine below.
You will also see that I have two aliases defined now at two places:
-  The "sts" alias in an include file from my personal .gitconfig ni my HOME
-  The "st" alias in the include file that is part of the repository which is included in the config of the worktree

Only the "sts" alias is recognized by git and works, while the "st" is unknown.
But both of the aliases show equally in the below "git config -list".

WHY is the one working and the other one not!
HOW can I get both working equally?

Any hints or help is greatly appreciated.
Thanks and best regards,
Frank


me@MYPC /c/WORK/my_src/wt_KER-dev-B (Features/2.1/gitUtilities|SPARSE)
$ git config --list --show-origin
file:D:/Programs/GitForWindows/etc/gitconfig    http.sslcainfo=D:/Programs/GitForWindows/mingw64/ssl/certs/ca-bundle.crt
file:D:/Programs/GitForWindows/etc/gitconfig    http.sslbackend=openssl
file:D:/Programs/GitForWindows/etc/gitconfig    diff.astextplain.textconv=astextplain
file:D:/Programs/GitForWindows/etc/gitconfig    filter.lfs.clean=git-lfs clean -- %f
file:D:/Programs/GitForWindows/etc/gitconfig    filter.lfs.smudge=git-lfs smudge -- %f
file:D:/Programs/GitForWindows/etc/gitconfig    filter.lfs.process=git-lfs filter-process
file:D:/Programs/GitForWindows/etc/gitconfig    filter.lfs.required=true
file:D:/Programs/GitForWindows/etc/gitconfig    credential.helper=manager
file:D:/Programs/GitForWindows/etc/gitconfig    core.autocrlf=true
file:D:/Programs/GitForWindows/etc/gitconfig    core.fscache=true
file:D:/Programs/GitForWindows/etc/gitconfig    core.symlinks=false
file:D:/Programs/GitForWindows/etc/gitconfig    pull.rebase=false
file:C:/Users/myaccount/.gitconfig       user.name=My Name
file:C:/Users/myaccount/.gitconfig       mailto:user.email=me@xxxxxxx
file:C:/Users/myaccount/.gitconfig       receive.denycurrentbranch=updateInstead
file:C:/Users/myaccount/.gitconfig       include.path=.gitconfig.aliases
file:C:/Users/myaccount/.gitconfig.aliases       alias.sts=status -s
file:C:/WORK/my_src/_MAIN/.git/config core.repositoryformatversion=1
file:C:/WORK/my_src/_MAIN/.git/config core.filemode=false
file:C:/WORK/my_src/_MAIN/.git/config core.bare=false
file:C:/WORK/my_src/_MAIN/.git/config core.logallrefupdates=true
file:C:/WORK/my_src/_MAIN/.git/config core.ignorecase=true
file:C:/WORK/my_src/_MAIN/.git/config core.symlinks=true
file:C:/WORK/my_src/_MAIN/.git/config core.longpaths=true
file:C:/WORK/my_src/_MAIN/.git/config mailto:remote.origin.url=git@xxxxxxxxxxxxxx:project.git
file:C:/WORK/my_src/_MAIN/.git/config remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
file:C:/WORK/my_src/_MAIN/.git/config branch.master.remote=origin
file:C:/WORK/my_src/_MAIN/.git/config branch.master.merge=refs/heads/master
file:C:/WORK/my_src/_MAIN/.git/config extensions.worktreeconfig=true
file:C:/WORK/my_src/_MAIN/.git/config fetch.prune=true
file:C:/WORK/my_src/_MAIN/.git/config fetch.prunetags=true
file:C:/WORK/my_src/_MAIN/.git/worktrees/wt_KER-dev-B/config.worktree include.path=C:/WORK/my_src/wt_KER-dev-B/.gitconfig
file:C:/WORK/my_src/wt_KER-dev-B/.gitconfig   core.hookspath=devops/git/hooks
file:C:/WORK/my_src/wt_KER-dev-B/.gitconfig   core.longpaths=true
file:C:/WORK/my_src/wt_KER-dev-B/.gitconfig   extensions.worktreeconfig=true
file:C:/WORK/my_src/wt_KER-dev-B/.gitconfig   fetch.prune=true
file:C:/WORK/my_src/wt_KER-dev-B/.gitconfig   fetch.prunetags=true
file:C:/WORK/my_src/wt_KER-dev-B/.gitconfig   alias.st=status
file:C:/WORK/my_src/_MAIN/.git/worktrees/wt_KER-dev-B/config.worktree core.sparsecheckout=true

me@MYPC /c/WORK/my_src/wt_KER-dev-B (Features/2.1/gitUtilities|SPARSE)
$ git st
git: 'st' is not a git command. See 'git --help'.

The most similar commands are
        status
        sts

me@MYPC /c/WORK/my_src/wt_KER-dev-B (Features/2.1/gitUtilities|SPARSE)
$ git sts
M .gitconfig
M devops/python/modules/gitUtilities.py






[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux