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

Why Git won’t let you push to non-bare repositories The original poster says: One solution is to run the following command: git config receive.denyCurrentBranch ignore After this it works, but I would like to know why I need to use this option. Is this the only option? What are the consequences of doing this? As … Read more

VS 2015 + Bower: Does not work behind firewall

Same problem using VS 2015, my workaround : Install Git http://git-scm.com/ Configure Git to use http instead of git:// with Git Bash git config –global url.”http://”.insteadOf git:// Edit (as pointed by g.pickardou) you can use https to be more secure: git config –global url.”https://”.insteadOf git:// Configure VS to use the new installed Git over VS … Read more

Git excludesfile for a branch

Git does not support per-branch excludes files You’re trying to achieve something that Git does not support. The blog post is the original source of this hoax that the Stack Overflow answer only parroted. As noted in comments under that answer, even the original blog post contains a discussion that brings out that the solution … Read more

Is it possible to have different Git configuration for different projects?

There are 3 levels of git config; project, global and system. project: Project configs are only available for the current project and stored in .git/config in the project’s directory. global: Global configs are available for all projects for the current user and stored in ~/.gitconfig. system: System configs are available for all the users/projects and … Read more

Git: can I suppress listing of ‘modified content’/dirty submodule entries in status, diff, etc?

There is even a possibility to set the ignore mode for every added submodule within the .gitmodules file. Just today I encountered this problem and immediately wrote an article in my blog about it after finding a solution: How to ignore changes in git submodules The gist of it: Once you added a submodule there … Read more

How to change my Git username in terminal?

In your terminal, navigate to the repo you want to make the changes in. Execute git config –list to check current username & email in your local repo. Change username & email as desired. Make it a global change or specific to the local repo: git config [–global] user.name “Full Name” git config [–global] user.email … Read more

git: ‘credential-cache’ is not a git command

From a blog I found: This [git-credential-cache] doesn’t work for Windows systems as git-credential-cache communicates through a Unix socket. Git for Windows Since msysgit has been superseded by Git for Windows, using Git for Windows is now the easiest option. Some versions of the Git for Windows installer (e.g. 2.7.4) have a checkbox during the … Read more

How can I make Sublime Text the default editor for Git?

Windows Sublime Text 2 (Build 2181) The latest Build 2181 just added support for the -w (wait) command line argument. The following configuration will allow ST2 to work as your default git editor on Windows. This will allow git to open ST2 for commit messages and such. git config –global core.editor “‘c:/program files/sublime text 2/sublime_text.exe’ … Read more