Git

作者: 小王子__ | 来源:发表于2020-07-28 20:45 被阅读0次
    1,git rebase  // 能够将分叉的分支重新合并
    2,git branch <branch_name>  //创建指定名称的分支
    3,git branch  // 查看本地所有分支
      git branch -r // 查看远程分支
      git branch -a   // 查看本地及远端所有分支
      git branch -v  // 查看分支详情,包括分支指向的commitId及提交信息
    4,git checkout <branch_name>  // 切换到指定分支
        git checkout -b <branch_name>  // 创建并切换到指定分支
    5,git branch -d <branch_name>  // 删除本地分支
      git branch -d -r <branch_name>  // 删除远程分支
      git branch -D <branch_name>  // 强制删除一个分支
    6,git merge <branch_name>  // 将指定分支合并到当前分支
    7,git stash  // 将工作暂存
      git stash list  // 列出所有的暂存状态 
      从暂存区之中进行恢复,有两种处理方式:
          1.先恢复,而后再删除暂存
              git stash apply
              git stash drop
          2.恢复的同时也将stash内容删除
            git stash pop
    8,git branch -v  // 查看本地分支信息
          git branch -vv  // 查看更多本地分支信息
          git branch -av // 查看所有分支信息
    

    相关文章

      网友评论

          本文标题:Git

          本文链接:https://www.haomeiwen.com/subject/thefrktx.html