Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Post History
With help from hkotsubo in the comments, it seems you can follow the behavior described by Git's documentation. This will work until they change it, at least for your *Nixes and *BSDs: path="${XDG...
Answer
#1: Initial revision
With help from hkotsubo [in the comments][1], it seems you can follow the behavior [described by Git's documentation][2]. This will work until they change it, at least for your \*Nixes and \*BSDs: ```bash path="${XDG_CONFIG_HOME:-$HOME/.config}/git/config" [[ -f "$path" ]] && echo "$path" || echo "$HOME/.gitconfig" ``` [1]: https://software.codidact.com/comments/thread/10572#comment-26466 [2]: https://git-scm.com/docs/git-config#FILES