In this example, we will look at how we can query the existing configuration and set the configuration values.
Querying the existing configuration
Getting ready
We'll use jgit again by using the following command:
$ cd jgit
How to do it...
You can use git config to query your local and global Git configuration. In this section, we will show a couple of examples.
- To view all the effective configurations for the current Git repository, run the following command:
$ git config --list user.name=John Doe user.email=john.doe@example.com core.repositoryformatversion=0 core...