美文网首页
git学习之路1

git学习之路1

作者: 七宝qb | 来源:发表于2016-11-10 01:01 被阅读20次

    git 本地基本命令

    命令 涵义 参数
    git status 查看版本库状态
    git init 初始化git 仓库
    git add 添加 name 添加name文件
    git commit 提交 -m 信息提交
    git log commit 记录
    git branch 分支 查看分支
    name 新建name分支
    -d 删除合并的name分支
    -D 强制删除name分支
    git checkout 切换分支 name 切换到name分支
    -b name 新建name分支(或tag版本) 并切换到name分支
    git merge 合并分支 name 把name分支代码合并过来 (要先切换到master分支)
    git tag 版本 查看版本
    git reset 版本更改 --hard HEAD^ 回退到上一个版本 (几个^回退几个版本)
    --hard~num 回退num个版本
    --hard num 转到 版本号为num的版本
    git reflog 历史命令 查看历史命令及对应版本号

    相关文章

      网友评论

          本文标题:git学习之路1

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