Last active
August 29, 2015 14:01
-
-
Save itbdw/66f39a6ef67d299062b8 to your computer and use it in GitHub Desktop.
git config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# git 常用配置 | |
## git 预配置 | |
git config --global push.default simple | |
git config --global user.editor vim | |
git config --global user.name "yourname" | |
git config --global user.email "youremail" | |
# 忽略大小写 | |
git config core.ignorecase false | |
##安全的新建分支 | |
git fetch -p | |
git checkout master | |
git pull | |
git checkout -b xxxx_fix_xxx | |
##提交请求 | |
git status | |
git commit -a -m 'for xxxxxx' | |
git push | |
##合并远端的修改,偷懒做法 | |
在当前分支执行 | |
git pull | |
或者 | |
git fetch -p | |
git merge $branch | |
##忽略所有本地修改,并从远端拉取该分支最新结果 | |
git reset --hard origin/$current_branch | |
git fetch -p | |
git checkout $git_branch |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment