Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Use GIT_AUTHOR_EMAIL and GIT_AUTHOR_NAME environment variables during commit #940

astanoszek started this conversation in Ideas
Discussion options

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.

You must be logged in to vote

Replies: 3 comments 3 replies

Comment options

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?

You must be logged in to vote
0 replies
Comment options

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.

You must be logged in to vote
2 replies
Comment options

How do you set an env variable in a ssh key?

Comment options

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...

Comment options

very interesting. I guess it could be done pretty central in asyncgit. would you be up to contribute that?

You must be logged in to vote
1 reply
Comment options

Unfortunatelly, I know nothing about Rust, so it's beyond my skills.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
Converted from issue

This discussion was converted from issue #475 on October 11, 2021 06:33.

AltStyle によって変換されたページ (->オリジナル) /