Git远程版本库
2019-10-30 23:16
615 查看
Git远程版本库
===============================================================================
概述:
===============================================================================
Git 远程版本库
1.分布式版本控制系统
★基于的是网络协议
http,https,ssh,git
2.克隆操作
★git clone
★原始版本库存储在 refs/heads/
3.git 服务器
★协议
本地协议(local)、HTTP/HTTPS协议、SSH协议、Git协议
☉本地协议
URL:
/path/to/repo.git
file:///path/to/repo.git
☉Git协议:由git-daemon程序提供,监听在tcp的9418端口;仅支持“读”操作,无任何认证功能;
URL:
git://host/path/to/repo.git
git://host/~user/path/to/repo.git
☉SSH协议
演示1:本地协议
[root@node1 ~]# git clone file:///root/taotao/ /root/huihui Cloning into '/root/huihui'... remote: Enumerating objects: 32, done. remote: Counting objects: 100% (32/32), done. remote: Compressing objects: 100% (23/23), done. remote: Total 32 (delta 8), reused 0 (delta 0) Receiving objects: 100% (32/32), done. Resolving deltas: 100% (8/8), done. [root@node1 ~]# cd /root/huihui/ [root@node1 huihui]# ls first.sh INSTALL my.txt readmin second.sh subdir [root@node1 huihui]# cd .git/ [root@node1 .git]# ls branches config description HEAD hooks index info logs objects packed-refs refs [root@node1 .git]# tree refs/ refs/ ├── heads │ └── master #实际上只clone的master分支 ├── remotes #远程跟踪分支 │ └── origin │ └── HEAD #指向master分支 └── tags 4 directories, 2 files [root@node1 ~]# tree /root/taotao/.git/refs/ /root/taotao/.git/refs/ ├── heads │ ├── dev │ ├── fotfix │ └── master └── tags 2 directories, 3 files
相关文章推荐
- Git中从远程的分支获取最新的版本到本地方式如下
- GIT本地回退版本并且更新远程仓库
- git 远程版本库,github提供服务原理,git自动更新发送邮件
- git 远程版本库,github提供服务原理,git自动更新发送邮件
- Git合并远程仓库和版本回退
- [Git高级教程(二)] 远程仓库版本回退方法
- git将远程仓库最新版本拉到本地仓库
- 如何解决更新被拒绝,因为远程版本库包含您本地尚不存在的提交。这通常是因为另外 提示:一个版本库已向该引用进行了推送。再次推送前,您可能需要先整合远程变更 提示:(如 'git pull ...')。
- GIT仓库学习--本地、远程仓库版本回退
- git回退到某个版本并提交到远程仓库
- git回退到远程某个版本
- git 远程版本库
- Git快速入门-git stash 暂存变更,git reset 撤销commit,git revert 回退远程版本库
- 版本管理—Git之使用GitHub搭建远程仓库
- Git 项目自动 release 生成版本并提交远程
- Git回滚远程版本
- Git 远程仓库(分布式版本控制系统)
- git回退远程分支的版本
- git 远程版本库,github提供服务原理,git自动更新发送邮件