git-config

What are the consequences of using receive.denyCurrentBranch in Git?

[亡魂溺海] 提交于 2019-11-27 06:40:22
I have a Git repository. I have cloned the repository and can commit my local changes. When I push my changes to the server it works. As soon as I create a branch, I checkout the branch, commit my work and then checkout the master branch. I then merge my local changes into the master branch. When I try to push to the server I get the following exception: Welcome to Git (version 1.7.11-preview20120620) Run 'git help git' to display the help index. Run 'git help <command>' to display help for specific commands. $ git push origin master:master Counting objects: 9, done. Delta compression using up

git: 'credential-cache' is not a git command

放肆的年华 提交于 2019-11-27 05:46:54
I followed these instructions to the letter, including the part about password caching. It seems like the instructions are wrong, because every time I git push origin master I get this error: git: 'credential-cache' is not a git command. See 'get --help'. ... at which point I am forced to enter my username and password. After doing so, I am presented with the same error message again, followed by the output from git push . Here is the contents of my .gitconfig file: [user] name = myusername email = myusername@myemaildomain.com [credential] helper = cache To be clear, after I installed Git and

git config: list all variables and their default values

◇◆丶佛笑我妖孽 提交于 2019-11-27 05:25:39
问题 Similar to the MySQL show variables command that shows all variables and not just the ones defined in my.ini , I would like to see a list of all config variables in git along with their default values, and not just those defined in my ~/.gitconfig . Is this possible? 回答1: That was debated in this thread in 2013, requested by Sebastian Schuberth, Jeff King (Peff) adding: The expected output is certainly a problem, but the issue is more fundamental than that: git config does not even know what

override git config --system in .gitconfig user file ( git config --global )

删除回忆录丶 提交于 2019-11-27 05:13:22
I have that file in a system wide configuration (but it can also be included with git config include.path="/path/to/defaultconfig" I would like to reset some values previously setted. In particular, the default config file contains diff.external = git-diff-wrapper , and I would like to deactivate it for some user If it is a system wide config, each user can override a config value in his/her global and local settings. But there is no easy way to "deactivate" a setting in a lower config file. Even set it to "" generally has unintended consequences. That very topic was discussed in April 2010 .

How to tell git to use the correct identity (name and email) for a given project?

偶尔善良 提交于 2019-11-27 05:01:46
问题 I use my personal laptop for both work and personal projects and I would like to use my work email address for my commits at work (gitolite) and my personal email address for the rest (github). I read about the following solutions which are all either global or temporary: git config --global user.email "bob@example.com" git config user.email "bob@example.com" git commit --author "Bob <bob@example.com>" setting one of the GIT_AUTHOR_EMAIL , GIT_COMMITTER_EMAIL or EMAIL environment variables

Best practices for cross platform git config?

余生长醉 提交于 2019-11-27 04:10:12
问题 Context A number of my application user configuration files are kept in a git repository for easy sharing across multiple machines and multiple platforms. Amongst these configuration files is .gitconfig which contains the following settings for handling the carriage return linefeed characters [core] autocrlf = true safecrlf = false Problem These settings also gets applied on a GNU/Linux platform which causes obscure errors. Question What are some best practices for handling these platform

How do I configure Araxis Merge for use with Git?

核能气质少年 提交于 2019-11-27 03:52:27
问题 I understand that Araxis Merge is now a "fully supported" mergetool for Git, so that much of what I can find about configuring Git to use it is now out of date. In particular, Araxis Merge should work "out of the box" simply by executing git config --global merge.tool araxis provided araxis is on my PATH. However, for a several reasons, amending my PATH is not an option, so I need to be able to specify the correct path or cmd in .gitconfig . How should I configure Git (on OS X) so that it

Pass an argument to a Git alias command

天涯浪子 提交于 2019-11-27 03:31:16
Can I pass arguments to the alias of a Git command? I have some alias in Git config, like so: rb1 = rebase -i HEAD~1 rb2 = rebase -i HEAD~2 rb3 = rebase -i HEAD~3 rb4 = rebase -i HEAD~4 .... Is it possible to make an rb alias so that git rb <x> works for any <x> ? I tried this alias: rb = rebase -i HEAD~ but then for instance git rb 8 does not work. VonC If you consider the Git Faq section "Git Aliases with argument" , you could do it, but by calling git through a shell: [alias] rb = "!sh -c \"git rebase -i HEAD~$1\" -" I haven't tested it yet, but if you can pass an argument, that would be

Understanding .git/config's 'remote' and 'branch' sections

£可爱£侵袭症+ 提交于 2019-11-27 02:29:41
问题 Here's the contents of the remote and branch sections of my .git/config file. [remote "origin"] url = https://EvanAad@bitbucket.org/EvanAad/bitbucketstationlocations.git fetch = +refs/heads/*:refs/remotes/origin/* [branch "master"] remote = origin merge = refs/heads/master What is the meaning and purpose of the contents of these sections, in particular the fetch and merge subsections? How is this information used by Git to guide its operation? 回答1: Its called refspec. Its the mechmism that

Git colors: How do I set colors for the upstream branch in “git branch -vv”?

谁都会走 提交于 2019-11-27 01:19:33
问题 I'm able to see my local and remote branches colored differently with the following configuration in my .gitconfig. [color "branch"] current = bold cyan local = normal remote = bold red In git branch -vv however, there is an additional upstream branch displayed that has a different color which is unreadable on my screen. How do I configure this “upstream” color? (movie pun unintended :) A git help config lists the color parameters for many branch types but I'm not able to find out one for