Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document how to separate work vs personal personas in gitconfig. #45

Merged
merged 3 commits into from
Mar 16, 2022

Conversation

justinabrahms
Copy link
Member

@justinabrahms justinabrahms commented Mar 9, 2022

This was a discussion we had in a todo touchpoint. Folks seemed to think this was a good place for this information. If you have better suggestions where/how this should be structured, feel free to make relevant changes or ask me to do it.

todogroup.org issue: todogroup/todogroup.org#266

Copy link
Contributor

@misappi misappi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution.
Instead of having a dedicated file for the topic, I suggest to create a new file "05_appendix.md" for these kind of smaller hints and recommendations and have a section "Managing work vs personal personas" in there. In future, we could add further topics to that file.
Also, I suggest to add the usage of the command git config ... as another option to maintain that information - as documented here.

@justinabrahms
Copy link
Member Author

I've moved the file. I'm going to skip the git config mention, because this thing necessarily involves authoring gitconfigs by hand.

content/05-appendix.md Outdated Show resolved Hide resolved
@misappi
Copy link
Contributor

misappi commented Mar 15, 2022

I've moved the file. I'm going to skip the git config mention, because this thing necessarily involves authoring gitconfigs by hand.

Hi @justinabrahms, nevertheless I suggest to mention the git config ... option. IMO, that's what one normally would do. Your approach adds some automation to it. Mentioning the git config ... option would give more context to your approach.

BTW: We are just working on a section about spare time contributions /moonlighting (see #44 ). We would link your contribution from that section since it fits very well for that topic :-).

@justinabrahms
Copy link
Member Author

You can't use git config to accomplish the point of the article. Perhaps I'm being dense, but maybe you can make a suggestion with the prose you want?

@gtback
Copy link
Member

gtback commented Mar 15, 2022

@justinabrahms, I think git-config has an -f/--file option that you could use to write config settings into particular files.

So something like git config --file ~/my-company/.gitconfig user.email [email protected]

In my limited testing right now, I couldn't get it to work, but I might be doing something wrong.

@misappi
Copy link
Contributor

misappi commented Mar 15, 2022

You can't use git config to accomplish the point of the article. Perhaps I'm being dense, but maybe you can make a suggestion with the prose you want?

OK, here's my understanding: Your text suggests a solution for the following problem : I want to indicate the contributions that I did on behalf of the company that I am working for and the contributions that I did as a private person during my spare time with appropriate mail addresses (of course, I could separate both types of contributions if I used different GH accounts, but many developers want to have only one account, and - as far as I know - GH only allows one free account per person which might also speak against having more than one account).

The canonical approach (at least IMO) would be the one that is documented here. I.e., you have to maintain the mail address that shall be used for commits per repository using git config .... Which can become cumbersome. Your approach makes life easier since it adds some automation (a dedicated .gitconfig is used based on some criteria. That .gitconfig specifies the mail address to be used for commits).

My point was that describing the git config ... option first would give more context because it helps to undetrstand why your approach is better / more convenient in certain situations.

@justinabrahms
Copy link
Member Author

Thanks, @misappi. That explaination makes tons of sense to me now. I've updated it to include that option.

@jlprat I also fixed the comment you left.

Copy link
Contributor

@misappi misappi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, @justinabrahms. Looks good to me.

@misappi misappi merged commit 09a527d into todogroup:main Mar 16, 2022
Copy link
Member

@jlprat jlprat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @justinabrahms

@gtback
Copy link
Member

gtback commented Mar 16, 2022

Thanks, @justinabrahms! Looks great.

In my limited testing right now, I couldn't get it to work, but I might be doing something wrong.

This was because I was reading it incorrectly; 100% on my side 🤦🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants