美文网首页
Git的基本使用方法

Git的基本使用方法

作者: 开心的许久 | 来源:发表于2018-02-12 17:51 被阅读0次

    初始化配置全局用户名和邮箱

    git config --global user.name "Your Name"
    git config --global user.email "email@example.com"
    

    初始化配置库repository

    git init
    

    将本地库同步到远程

    git remote rm origin
    git remote add 远程库的url
    git push
    

    查看当前库的状态

    git status
    

    查看修改文件的内容

    git diff 文件名
    

    添加文件

    git add 文件名
    git commit -m "提交说明"
    

    查看历史版本

    git log
    git reflog
    

    版本回退

    git reset 
    

    相关文章

      网友评论

          本文标题:Git的基本使用方法

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