zoukankan      html  css  js  c++  java
  • git常用代码

    //当前文件夹删除的文件恢复
    git reset Head .
    // 查看所有分支
    git branch
    // 查看本地分支 对应的远程分支
    git branch -vv
    //git branch -vv
    //创建分支
    git branch Head
    //切换分支
    git checkout head
    //切换到head分支,如果不存在则创建
    git checkout -b head
    //从origin/master中下拉-git fetch and git merge两步
    git pull origin master
    //查看HEAD分支指向
    git show HEAD
    //下拉
    git fetch --all
    //删除本地分支
    git branch -d [branchname] 
    //删除远程分支: 
    git push origin --delete [branchname]
    //查看远程url
    git remote -v
    git克隆的时候,head detach了,此时提交代码失败,
    然后使用git reflog查看已提交的代码
    git branch commitid,然后即可查看
    //git 设置head分支
    git remote set-head origin master
    //git pull
    git pull origin 分支名
    //重置到指定版本
    git reset --hard  版本提交号

  • 相关阅读:
    HDU 5650 异或
    HDU 5646
    HDU 5645
    P2075 [NOIP2012T5]借教室 区间更新+二分查找
    HDU 5641
    读写分离
    linux执行cmd之一
    html2image
    挂载引起的权限问题
    如何防止sql注入
  • 原文地址:https://www.cnblogs.com/yang131/p/14372278.html
Copyright © 2011-2022 走看看