栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 系统运维 > 运维 > Linux

repo安装管理本地git库

Linux 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

repo安装管理本地git库

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

文章目录
  • 前言
  • 一、repo安装
  • 二、建立本地manifest库
    • 1.xml 文件
    • 2.repo 管理
  • 总结


前言

在项目中使用git管理源码,在某些项目中涉及到多个git库,手动进行更新,需进入每个库进行更新等操作,如涉及库较多,更新繁琐不说,还容易遗漏,正是如此才引入repo工具进行管理。本文就介绍了repo安装,与使用基本。


一、repo安装

安装命令:

curl https://storage.googleapis.com/git-repo-downloads/repo > /bin/repo

修改repo

	REPO_URL = 'https://gerrit.googlesource.com/git-repo'

修改为

   REPO_URL='https://mirrors.tuna.tsinghua.edu.cn/git/git-repo'

然后运行路径配置执行

PATH=~/bin:$PATH  
二、建立本地manifest库 1.xml 文件

default.xml(示例):




	
	     	
	

	


配置说明

  

  

  

  

   

然后将manifest提交到本地服务器

2.repo 管理

命令(示例):

repo init -u http://localhost/manifest.git
project .repo/manifests/
更新 605cc3b..90c1cfc
Fast-forward


Your identity is: xxxxx   xxxxx
If you want to change this, please re-run 'repo init' with --config-name

repo has been initialized in /data/home/bin/
If this is not the directory in which you want to initialize repo, please run:
   rm -r /data/home/bin//.repo

然后输入

$ repo sync
Fetching:  0% (0/2) warming upInvalid clone.bundle file; ignoring.
Fetching: 100% (2/2), done in 0.811s
Garbage collecting: 100% (2/2), done in 0.029s
repo sync has finished successfully.


总结

repo安装使用也是网上参考众多教程,然后记录自己的安装配置过程,避免以后遗忘,又得网上重新各种百度

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/826348.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号