zoukankan      html  css  js  c++  java
  • git

    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

  • 相关阅读:
    Python多进程编程
    Cython学习
    cProfile——Python性能分析工具
    Python垃圾回收机制:gc模块
    新纪元
    类模版的static成员
    我的2015plan
    Linux之sed
    getenv, _wgetenv
    vs2010下如何调试带输入参数的程序
  • 原文地址:https://www.cnblogs.com/banwhui/p/4863432.html
Copyright © 2011-2022 走看看