首页 > 其他 > 详细

git

时间:2015-10-09 12:14:01      阅读:250      评论:0      收藏:0      [点我收藏+]

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

git

原文:http://www.cnblogs.com/banwhui/p/4863432.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!