Git Common configuration Items

Source: Internet
Author: User

Git Common configuration Global Submit user name and mailbox

git config--global user.name "Yuchen Deng"
git config--global user.email mailbox name @gmail.com

Chinese encoding support

echo "Export Lesscharset=utf-8" > $HOME/.profile
git config--global gui.encoding utf-8
git config--global i18n.commitencoding utf-8
git config--global i18n.logoutputencoding gbk

Global editor, COMMIT_EDITMSG encoding is converted to UTF-8 to avoid garbled characters when committing

git config--global core.editor notepad2

Diff Tool configuration

git config--global diff.external git-diff-wrapper.sh
git config--global diff.tool tortoise
git config--global difftool.tortoise.cmd ' tortoisemerge-base: "$LOCAL"-theirs: "$REMOTE" '
git config--global difftool.prompt false

Merge tool configuration

git config--global merge.tool tortoise
git config--global mergetool.tortoise.cmd ' tortoisemerge-base: "$BASE"-theirs: "$REMOTE"-mine: "$LOCAL"-merged: "$ Merged "'
git config--global mergetool.prompt false

Alias settings

git config--global alias.dt difftool
git config--global alias.mt mergetool

Note: When you specify git config, –global is the global setting, which is not global if not specified.

Git Common configuration Items

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.