zoukankan      html  css  js  c++  java
  • 项目中git的用法

     

     

     一、常用git命令

     1、gst  查看有哪些文件被修改了;

     2、git add   添加修改的文件;

     3、git commit -m "注释" 提交到本地

     4、git pull origin +分支名  拉分支

     5、git checkout  +分支名  切换分支

     6、git branch   显示本地分支

     7、git branch -r 远程分支

     8、git push origin +分支名   远程提交代码

    二、  iOS 切换与还原

       1、 cd ios 

       2、 git checkout zhu/

       3、git reset --hard

       4、cd ..

       5、git submodule update  更新子模块

     三、 处理冲突

        1、git stash  缓存本地修改

        2、git pull 拉最近代码

        3、git stash pop 本地缓存取出,有冲突会自动merge

        4、手动修改

        5、git config --list 分支的配置

        6、git reset HEAD

        7、git add

        8、git commit

        9、git push

        10、git push origin zhuli0421:zhuli0609 新建分支

      四、回到原版本

        1、git log

        2、git reset

        3、git pull 

  • 相关阅读:
    C对字符串的部分操作
    <string> <string.h>
    最常见的HTTP错误
    python面试题
    玩转type类型(牛逼克拉斯 )
    django路由系统之反向生成url
    django事物回滚
    django中admin路由系统工作原理
    django中的django admin插件
    ajax跨域资源共享
  • 原文地址:https://www.cnblogs.com/zk666/p/6908470.html
Copyright © 2011-2022 走看看