git-config

What does git-config(1) mean when it says “colors are used only when the output is to a terminal”?

霸气de小男生 提交于 2019-12-07 01:34:12
问题 I'm outputting to a terminal, but Git is not correctly detecting that I'm outputting to a terminal, for the purposes of coloring the output. My question is, what does git-config(1) really mean when it says "colors are used only when the output is to a terminal" (this phrase appears at the end of multiple config descriptions, such as for color.ui and color.branch)? In other words, how does Git decide whether or not it's outputting to a terminal, and how do I change my environment settings to

How to find out which Git config file is used and how to override settings?

…衆ロ難τιáo~ 提交于 2019-12-06 17:14:33
问题 I have two related questions: How can I determine precisely which config file is being used by my Git bash client? Can I override settings in the config file being used? I know that there is a system, global and local (aka project) .gitconfig file. And, according to the Git site, each of these "levels" (system, global, local) overwrites values in the previous level, so values in the ./git/config (local) trump those in /etc/gitconfig , for instance. In other words we are dealing with a

Using same git repository by multiple users

馋奶兔 提交于 2019-12-06 11:12:52
As far as I know, only a single user's identity may be specified with git config. I have a situation where I'd like to have multiple identities for the same git repository, depending on the UNIX user. The repository is at /var/www. When user jack makes a commit to it, the commit should automatically be jack's identity. When user jill makes a commit, jill's identity should be used. The reason why I want to use the same repository is because it's the content of a website, and Apache is looking in /var/www. The contents are NOT user-specific, so using Apache's userdir feature is not an option

fatal: bad config value for 'receive.denycurrentbranch' in ./config

眉间皱痕 提交于 2019-12-06 10:24:05
I use git to push commited changes to a repo that lies on a server. Now there is this Error: $ git push -u origin master fatal: bad config value for 'receive.denycurrentbranch' in ./config fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. What it looks like in the console Window Now I suppose that this error might be due to some failures in the SSH connection. I use PuTTY to connect via SSH to my webserver. However, I'm still a noob and i don't know exactly how this works. So what I've tried is that I genereated the

Can I set push-options (git push -o “…”) in git config?

两盒软妹~` 提交于 2019-12-06 06:02:32
Git 2.10 introduced git push options ( git push -o "my string" ). Many command line options are configurable, and I was wondering if it was possible for this too. I was not able to find it in git-config , but perhaps I'm overlooking it. So, would it be possible to add a (set of) default push option(s), to have ... git push -o "r=joh.doe" ... the default when running ... git push ? Context: I am using this with Gerrit to directly assign changes to reviewers ( documentation for reference - using compatible syntax <push-ref>%my_string ). When uploading many changes and working in pairs to review

When did git introduce the “--local” switch for git config command?

笑着哭i 提交于 2019-12-05 20:45:55
问题 In what git version became the git config --local option available, and where can I read more about it? I thought that not providing --global will automatically assume that it's a local config variable. Why was this new option necessary? 回答1: Since the git sources are maintained in git, we can find the revision that introduced the --local option: commit 57210a678a8bedd222bf4478eeb0a664d9dd5369 Author: Sverre Rabbelier <srabbelier@gmail.com> Date: 2010-08-03 20:59:23 -0500 config: add --local

What does git-config(1) mean when it says “colors are used only when the output is to a terminal”?

瘦欲@ 提交于 2019-12-05 07:12:59
I'm outputting to a terminal, but Git is not correctly detecting that I'm outputting to a terminal, for the purposes of coloring the output. My question is, what does git-config(1) really mean when it says "colors are used only when the output is to a terminal" (this phrase appears at the end of multiple config descriptions, such as for color.ui and color.branch)? In other words, how does Git decide whether or not it's outputting to a terminal, and how do I change my environment settings to inform Git that my terminal is indeed a terminal? Specifics: I'm using rxvt terminal with Cygwin on

How to skip “Hit return to start merge resolution tool” and open mergetool automatically

ぐ巨炮叔叔 提交于 2019-12-05 07:03:23
Git asking to hit return button to open the mergetool for each conflict file one by one: > git mergetool Normal merge conflict for '...': {local}: modified file {remote}: modified file Hit return to start merge resolution tool (opendiff): How can I avoid the hitting return step for my project and just open the configured merge tool automatically? Use the -y flag. From the documentation : -y --no-prompt Don’t prompt before each invocation of the merge resolution program. To permanently skip the prompt, run: git config --global mergetool.prompt false To skip it for a single run of git mergetool

How do I include --no-pager in a Git alias?

若如初见. 提交于 2019-12-05 00:45:34
I created a Git alias based off of the Git Immersion tutorial by EdgeCase that looks like this: hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short But now it seems to be paging the results — Terminal shows (END) after the results are displayed, forcing me to hit Q to continue working. I read that by adding in the --no-pager tag, you can disable this feature; how do I incorporate it into the alias? I've tried it at the end, before the log , and right after, and none of them have worked. Git throws an error saying it is an unrecognized argument, or that it changes

gitconfig aliasing using !source doesn't work (zsh)

偶尔善良 提交于 2019-12-05 00:44:50
问题 I have a gitconfig like this: [alias] l = "!source ~/.githelpers && pretty_git_log" When I run it I get this: [desktop] git l source ~/.githelpers && pretty_git_log: 1: source: not found error: cannot run source ~/.githelpers && pretty_git_log: No such file or directory fatal: While expanding alias 'l': 'source ~/.githelpers && pretty_git_log': No such file or directory When I add any other shell builtins to test, they run fine: [alias] l = "!echo running from the builtin" [desktop] git l