3 ms·
I can't even test the functionality because it won't let me pass the first screen because I don't have config user.email set in my gitconfig. http://imgur.com/
by SysArchitect 10y ago
I can't even test the functionality because it won't let me pass the first screen because I don't have config user.email set in my gitconfig.
http://imgur.com/a/T4s4o http://imgur.com/a/T4s4o
I have a pre-commit hook that is installed on all new repo's I create/clone that warns me, and then I set an email address PER REPO. This way I can work on both $WORK and open source projects on the same machine while having different email addresses per repository.
The assumption that a user needs to have user.email set globally breaks my entire work-flow.
- DanPristupov 10y agoHi. Didn't even think about such a requirement. In next version I'll make credentials optional (with a warning though).
- cm3 10y agoPeople shouldn't use git without having configured that. It would prevent incorrect commits landing in public repositories. Actually git defaults to some made-up local git author if it's not set, and that's less useful and sometimes invalid, provoking git-fsck errors.
- yladiz 10y agoI agree. A potential middle ground would be a small button that lets them skip that screen with a second confirmation dialog box with a warning about it.
- spicyj 10y agoGit explicitly shows a "Committer" line when typing the commit message if it chooses a default, so I also find not setting one globally and getting this reminder to be more useful: # Please enter the commit message for your changes. Lines starting # with '#' will be ignored, and an empty message aborts the commit. # # Committer: Ben Alpert <balpert@balpert-mbp.local> # # On branch master # Your branch is up-to-date with 'origin/master'. #
- frio 10y agoFWIW, I solve this problem with ~/src/work and ~/src/personal. My default, system-wide config in .gitconfig are my personal creds. In ~/src/work, I have a direnv (http://direnv.net/ http://direnv.net/) which configures my work credentials. I used to do something similar to you, but this has been less effort to maintain/less repetition :) (which is nice, as our internal structure is lots of micro-repos so you're constantly cloning new things, and constantly adding creds becomes a hassle).