zoukankan      html  css  js  c++  java
  • 一些常用的git命令

    git in    初始化仓库

    git add .    添加到缓冲区

    git commit -m“备注”      添加到仓库

    git branch    查看本地分支

    git branch 【分支名】    新建本地分支

    git branch -l 【分支名】     创建一个本地分支

    git checkout -b 【分支名】   创建新的分支并且换到该分支

    git checkout 【分支名】    切换分支

    git branch -d【分支名】     删除分支

    git merge 【分支名】      把x分支加到所在分支

    git push origin --delete 【分支名】    删除远程仓库分支

    git remote add origin 【远程仓库地址】    连接远程仓库

    git push origin master   上传到远程仓库

    git pull origin master     从远程仓库拿取代码

    git log   查看提交历史

    git clone 【远程仓库代码地址】   从远程仓库复制代码

    git status     查看当前状态

    git diff     比较两个版本差异

    git reset --hard        把本地代码重置,放弃本次修改

    git reset 【修改码】    重置某一段代码

    git tag    列出所有标签

  • 相关阅读:
    Node.js 安装配置
    ITerm2配置-让你的mac命令行更加丰富高效
    ECharts 图表工具
    Vue 安装
    element-ui 安装
    mysql高级查询
    数据库第三章 参考
    DML和DQL 总结
    数据库第二章 参考答案
    数据库编程技术 第一章
  • 原文地址:https://www.cnblogs.com/liujiquan/p/7687397.html
Copyright © 2011-2022 走看看