سؤال

I have figured out how to make my own git command , but I want to be able to allow user saved settings required by my git command into git ~/.gitconfig file and later my git command read from the config file instead of having user to input each time the git command is executed.

Is there a simple way to read ~/.gitconfig file or do I have to parse read the content ?

هل كانت مفيدة؟

المحلول

Use git config --global. It is purpose-built for reading and writing settings to your .gitconfig.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top