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

Gitconfig user name and email won't work for all users #86

Closed
benknoble opened this issue Jul 30, 2017 · 1 comment
Closed

Gitconfig user name and email won't work for all users #86

benknoble opened this issue Jul 30, 2017 · 1 comment
Assignees
Milestone

Comments

@benknoble
Copy link
Owner

Expected Behavior

When installing, the user is prompted for a git user name and email, overwriting any that are currently present. This allows users to maintain their git identity and still pull in my git config.

This should be seamless and easy to maintain as changed, despite the fact that my repo's copy has my name and email.

Current Behavior

The issue is that as soon as the git config file has changed, the local repo has diverged from the remote. This would likely cause issues with pulls either

  1. overwriting the changed info, possibly causing the user to unknowingly change identities or
  2. causing conflicts, which is not a seamless user interaction

Possible Solution

Instead of overwriting the values in the file, consider two approaches.

Symlink iff Ben Knoble

  1. Prompt if Ben Knoble
  2. If yes
  3. Symlink git config
  4. If no
  5. cp git config
  6. Prompt for new values

or

Copy the file in place

  1. cp git config
  2. Prompt for user name and email

The first has the advantage that it's easier for me, as my copy is in sync with the repo always, &c. The second has the advantage that the script is simpler; it does the same thing no matter what.

The disadvantage for both is that any users other than me will need to occasionally see if the gitconfig file has been updated (mercifully this is now rare) and then cp it over, changing the values as necessary. That is, they should occasionally rerun setup/git-setup.sh with whatever fix is introduced.

Steps to Reproduce (for bugs)

  1. bootstrap this project and provide a different user and email when prompted.
  2. Pull in new changes.

Your Environment

  • Version used: Dotfiles 1.0 Bootstrap
  • Operating System and version: OS X 10.11.6
  • CLI used: Terminal
  • Version info of relevant software: git 2.13.3
@benknoble benknoble added this to the Version 1.1 milestone Jul 30, 2017
@benknoble benknoble self-assigned this Jul 30, 2017
@benknoble
Copy link
Owner Author

Also need to remove the whole configure gitignore part, as that can't be changed.

benknoble added a commit that referenced this issue Jul 30, 2017
@benknoble benknoble mentioned this issue Jul 30, 2017
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant