zoukankan      html  css  js  c++  java
  • git 和 repo 常用命令

    一、git

    1、回退到某个节点

      git reset --hard f39043d1c0cd1cda45a4569556758d0c00bf329a   

    2、查看提交记录

      git log

      git log -p  查看更改内容

      git show 节点号, 查看某个节点的更改内容,如git show f39043d1c0cd1cda45a456

     3、提交代码

      git pull ----------同步代码(查看是否与库上代码冲突)

      git add ./  ----------添加当前所有文件

      git rm 文件路径 ------------删除特定文件

      git status -----------查看当前工程状态

      git commit ---------提交代码 git commit --amend  -----追加提交

    二、repo

    1、查看repo下所有git工程更改文件列表

      repo status

    2、repo forall -c

      遍历所有的git仓库,并在每个仓库执行-c所指定的命令(被执行的命令不限于git命令,而是任何被系统支持的命令,比如:ls 、 pwd 、cp 等 

     3、repo拉新分支(例如创建分支new_branch)

    1)repo start  new_branch --all  (本地创建分支)
    
    2)repo forall -c git push 远程分支名  new_branch
    
    3)cd .repo/manifests
    4)vi default.xml
            <default revision="new_branch"
             remote="roobo-ipc"
             sync-j="4" />
    5)git add default.xml
    6)git commit -m "upload new_branch"
    7)git push origin HEAD:wet

      

  • 相关阅读:
    图片文件重命名
    MySql基础学习-Sql约束
    MySql基础学习-库表操作
    java内存模型
    数据库常用函数整理
    linux用户管理
    Db2数据库在Linux下的安装和配置
    图像金字塔
    特征值与特征向量
    齐次线性方程组
  • 原文地址:https://www.cnblogs.com/jly594761082/p/10501392.html
Copyright © 2011-2022 走看看