美文网首页
Git学习资料

Git学习资料

作者: cnwinds | 来源:发表于2020-03-09 11:49 被阅读0次

    思维导图

    思维导图

    常用命令

    常用操作 执行命令
    创建分支 git branch BranchName
    删除分支 git branch -d BranchName
    切换分支 git checkout BranchName
    查看所有版本 git branch -a
    创建并切换分支 git checkout -b BranchName
    强制放弃切换,放弃本地修改 git checkout -f newBranch
    放弃指定文件修改 git checkout FileName
    暂存修改,切换分支 git stash
    git checkout newBranch
    git stash pop
    暂存相关命令 git stash list
    git stash apply
    git stash drop
    强制放弃本地修改
    包含新增和删除文件
    git checkout .
    git clean -df
    合并修改
    将hot-fix合并到master
    git checkout master
    git merge hot-fix
    同步remote仓库 git fetch
    同步remote仓库,并合并到本地 git pull
    图形化显示分支历史结构 git log --graph
    git log --graph --oneline
    显示tag git tag
    git tag -l "v1.8.5*"
    创建tag git tag -a v1.4 -m "my version 1.4"
    推送tag git push origin v1.4
    git push origin --tags

    参考资料

    分支的新建与合并
    GIT基础 - 打标签
    GIT从远程仓库获取最新代码合并到本地分支
    git log --oneline --graph的读法

    相关文章

      网友评论

          本文标题:Git学习资料

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