-
-
Couldn't load subscription status.
- Fork 657
Use GIT_AUTHOR_EMAIL and GIT_AUTHOR_NAME environment variables during commit #940
-
One of the ways to provide author name of the commiter in git is to use the GIT_AUTHOR_NAME and GIT_AUTHOR_EMAIL environment variables.
It would be great if gitui used them also.
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 3 comments 3 replies
-
Hi @astanoszek thanks for your interest in gitui. I found those in the documentation: https://git-scm.com/book/en/v2/Git-Internals-Environment-Variables
did not even know they existed 🙈 can you give me a Little more insight when/why these are preferred over the git config?
Beta Was this translation helpful? Give feedback.
All reactions
-
Git config is great if you work with local repository. In my case I sometimes work in repository on the remote machine, which is shared by few people. In such a case I set the environment variable in my .ssh key and commit using my name.
I know that it is questionable practice and everybody should use local branches but you know - there are specific cases.
Beta Was this translation helpful? Give feedback.
All reactions
-
How do you set an env variable in a ssh key?
Beta Was this translation helpful? Give feedback.
All reactions
-
In my ~/.ssh/authorized_keys in the beginning of the line, before "ssh-rsa". For example the line with my key is:
environment="GIT_AUTHOR_NAME=Name Surname",environment="GIT_AUTHOR_EMAIL=name@surname.com" ssh-rsa AAAAB3...
Beta Was this translation helpful? Give feedback.
All reactions
-
very interesting. I guess it could be done pretty central in asyncgit. would you be up to contribute that?
Beta Was this translation helpful? Give feedback.
All reactions
-
Unfortunatelly, I know nothing about Rust, so it's beyond my skills.
Beta Was this translation helpful? Give feedback.