Tutorial by Examples

Right after you install Git, the first thing you should do is set your username and email address. From a shell, type: git config --global user.name "Mr. Bean" git config --global user.email [email protected] git config is the command to get or set options --global means that the ...
You have up to 5 sources for git configuration: 6 files: %ALLUSERSPROFILE%\Git\Config (Windows only) (system) <git>/etc/gitconfig, with <git> being the git installation path. (on Windows, it is <git>\mingw64\etc\gitconfig) (system) $XDG_CONFIG_HOME/git/config (Linux/Mac on...
There are several ways to set which editor to use for committing, rebasing, etc. Change the core.editor configuration setting. $ git config --global core.editor nano Set the GIT_EDITOR environment variable. For one command: $ GIT_EDITOR=nano git commit Or for all commands run in a ...
Description When working with a team who uses different operating systems (OS) across the project, sometimes you may run into trouble when dealing with line endings. Microsoft Windows When working on Microsoft Windows operating system (OS), the line endings are normally of form - carriage return ...
you can use -c <name>=<value> to add a configuration only for one command. To commit as an other user without having to change your settings in .gitconfig : git -c user.email = mail@example commit -m "some message" Note: for that example you don't need to precise both user...
If you are behind a proxy, you have to tell git about it: git config --global http.proxy http://my.proxy.com:portnumber If you are no more behind a proxy: git config --global --unset http.proxy
git config --global help.autocorrect 17 This enables autocorrect in git and will forgive you for your minor mistakes (e.g. git stats instead of git status). The parameter you supply to help.autocorrect determines how long the system should wait, in tenths of a second, before automatically applyin...
Git config allows you to customize how git works. It is commonly used to set your name and email or favorite editor or how merges should be done. To see the current configuration. $ git config --list ... core.editor=vim credential.helper=osxkeychain ... To edit the config: $ git config &lt...
Since Git 2.13, multiple usernames and email addresses could be configured by using a folder filter. Example for Windows: .gitconfig Edit: git config --global -e Add: [includeIf "gitdir:D:/work"] path = .gitconfig-work.config [includeIf "gitdir:D:/opensource/"] ...

Page 1 of 1