• 回退一个版本, 会删除本地最后一个版本(危险操作, 慎用)
git reset HEAD~1 && git reset --hard
  • 如果此刻再次执行git pull后, 会重新下载到最新的状态
  • 查看第N个提交的hash值, 当前值为1
vv=1;
git_hashcode=`git log -n $vv --pretty=format:"%H"`
v2=0;
for line in $git_hashcode
do
    declare -i v2=$v2+1;
    if [ "$v2" -eq "$vv" ]
    then
        echo $line;
    fi
done
  • 代理执行命令
git clone --config http.proxy="http://user:password@agent.com:1234"  https://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh

标签: git, proxy

添加新评论