git:// through proxy

If you are talking about git submodules, try this: git config –global url.https://github.com/.insteadOf git://github.com/ …taken from here. This way, you don’t need to set any proxy, nor run any script.

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

git config: list all variables and their default values

Edit Jan 23, 2022 git config –system -l for system-wide variables (retrieved from installation folder; references) git config –global -l for global variables (retrieved from ~/.gitconfig or $XDG_CONFIG_HOME/git/config if the first doesn’t exists; references) git config –local -l or git config -l for repository variables (retrieved from .git/config; references) Also note that although on docs … Read more

Different .gitconfig for a given subdirectory?

The best way to do this since git 2.13 is to use Conditional includes. An example (copied from an answer here): Global config ~/.gitconfig [user] name = John Doe email = john@doe.tld [includeIf “gitdir:~/work/**”] path = ~/work/.gitconfig Work specific config ~/work/.gitconfig [user] email = john.doe@company.tld

How to emulate git log –decorate’s different colors per branch-type

Per https://stackoverflow.com/a/16844346/55948 As of git 1.8.3 (May 24, 2013), you can use %C(auto) to decorate %d in the format string of git log. From the release notes: * “git log –format” specifier learned %C(auto) token that tells Git to use color when interpolating %d (decoration), %h (short commit object name), etc. for terminal output.)

Unable to auto-detect email address

Well, the message is pretty much self-explanatory. You did not tell git what your name and email address is. Open a command line and type: git config –global user.email “you@example.com” git config –global user.name “Your Name” Of course you should enter your real name and email. Afterwards git knows who you are and is able … Read more

Where do the settings in my Git configuration come from?

Git checks four places for a configuration file: Your machine’s system .gitconfig file. Your user .gitconfig file located at ~/.gitconfig. A second user-specific configuration file located at $XDG_CONFIG_HOME/git/config or $HOME/.config/git/config. The local repository’s configuration file .git/config. The settings cascade in the following order, with each file adding or overriding settings defined in the file above … Read more

How to colorize git-status output?

From git config doc: color.status.<slot> Use customized color for status colorization. <slot> is one of: header (the header text of the status message), added or updated (files which are added but not committed), changed (files which are changed but not added in the index), untracked (files which are not tracked by git), branch (the current … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)