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.
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.
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
Never turn autocrlf on, it causes nothing but headaches and sorrows. There’s no excuse to use \r\n on windows, all decent editors (by definition) can handle \n.
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
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
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.)
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 the way to do it. A similar solution … Read more
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
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
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