{"thread":{"id":"30150","subject":"Question about include feature in .gitconfig","startedAt":"2012-04-04T21:09:41Z","lastAt":"2012-04-04T21:15:04Z","messageCount":2,"participants":["Shouichi KAMIYA","Jeff King"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"188531","messageId":"CALOHgxG2q_6EN5HFs=btX2hF4jC7AaJuMu=2AqbCeZBD+wNj3w@mail.gmail.com","threadId":"30150","inReplyTo":null,"subject":"Question about include feature in .gitconfig","fromName":"Shouichi KAMIYA","fromEmail":"shouichi.kamiya@gmail.com","sentAt":"2012-04-04T21:09:41Z","receivedAt":"2012-04-04T21:09:41Z","isPatch":false,"sender":{"key":"shouichi.kamiya@gmail.com","avatar":null},"body":"Hello git users and developers,\n\nI have a question about \"include\" feature in config file.\nIn .gitconfig I included .my_super_secret_file like below.\n\n# .gitconfig\n[include]\n    path = .my_super_secret_file\n\n# .my_super_secret_file\n[github]\n    password = foobar\n\nNow, my question is return value of \"git config --global github.password\".\nI expect it to return foobar but it returns nothing. Is this behavior expected?\n\nCheers!\nShouichi\n\n-- \nShouichi KAMIYA\n"},{"id":"188532","messageId":"20120404211504.GA19421@sigill.intra.peff.net","threadId":"30150","inReplyTo":"CALOHgxG2q_6EN5HFs=btX2hF4jC7AaJuMu=2AqbCeZBD+wNj3w@mail.gmail.com","subject":"Re: Question about include feature in .gitconfig","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2012-04-04T21:15:04Z","receivedAt":"2012-04-04T21:15:04Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Thu, Apr 05, 2012 at 06:09:41AM +0900, Shouichi KAMIYA wrote:\n\n> I have a question about \"include\" feature in config file.\n> In .gitconfig I included .my_super_secret_file like below.\n> \n> # .gitconfig\n> [include]\n>     path = .my_super_secret_file\n> \n> # .my_super_secret_file\n> [github]\n>     password = foobar\n> \n> Now, my question is return value of \"git config --global github.password\".\n> I expect it to return foobar but it returns nothing. Is this behavior expected?\n\nYes, that's the expected behavior. Includes are not followed by default\nwhen you ask for the value from a _specific_ file, as you do with\n\"--global\".\n\nIf you do \"git config github.password\", you will get the answer you\nwant. You can also use \"git config --includes --global github.password\"\nif you want to search only ~/.gitconfig, but following includes.\n\n-Peff\n"}]}