git reset --hard HEAD|commit HEAD清掉现在的head HEAD~2 清掉最后两次提交 | commit 跳转到指定的一次commit
git reflog 找回reset的撤销
git revert commit 回滚到commit
git cherry-pick用于把另一个本地分支的commit修改应用到当前分支。
配置脚本:
git config --global user.name "xxxx"
git config --global user.email "xxxx@xxxx.com"
git config --system core.editor vim
git config --system color.ui "auto"
git config --global alias.co checkout
git config --global alias.df diff
git config --global alias.br branch
git config --global alias.st status
git config --global alias.ct commit
git config -l
#cat <<EOF >> /etc/bashrc
#EOF
#. /etc/bashrc
cat <<EOF >> ~/.bashrc
alias grep='grep --color=auto'
# For colourful man pages (CLUG-Wiki style)
export LESS_TERMCAP_mb=$'E[01;31m'
export LESS_TERMCAP_md=$'E[01;31m'
export LESS_TERMCAP_me=$'E[0m'
export LESS_TERMCAP_se=$'E[0m'
export LESS_TERMCAP_so=$'E[01;44;33m'
export LESS_TERMCAP_ue=$'E[0m'
export LESS_TERMCAP_us=$'E[01;32m'
EOF
source ~/.bashrc