get user and email from $HOME/.gitconfig
See original GitHub issuethis is the code, and the console.log() prints undefined。 But i can get the email value use ‘git config user.email’ in shell
async function f () {
let value = await git.config(Object.assign({
path: 'user.email',
}, repo));
console.log(value);
}
Issue Analytics
- State:
- Created 5 years ago
- Comments:15 (11 by maintainers)
Top Results From Across the Web
How to show or change your Git username or email address
How to show or change your Git username or email address · 1) The `git config` command. Here's the git config command to...
Read more >git config - How to know the git username and email saved ...
On windows, type git config --list | findstr user.name . This will give you user.name only. Share.
Read more >How to show or change your Git username or email address ...
Let's examine each of these show your git username basics: #1 – Use the command, git config -get [user.name | user.email] git config...
Read more >How to get git config username and email - Brainstorm Creative
I'll explain in this post how to get your git config user.name and user.email using the git config command so that you don't...
Read more >How set git config username and email fields in global and ...
If you want to use a special name or email address for a specific Git repo, you can set the git config email...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
FWIW, I’m using the following workaround for Node:
I then use it by trying a regular commit without any author info supplied to
commit
, and if that errs, I use the following (with try-catches omitted):Is the value defined locally, in
.git/config
or globally in~/.gitconfig
? Right nowisomorphic-git
can only read the local repo config file, not the one in the home directory. (I haven’t figured out what the “home directory” would be in a browser environment.)