走进Git的第一天001日记

今天是我开始学习Git的第一天,我了解到Git是一个分布式版本控制系统,它对于协作开发和代码管理非常有用。在安装了Git之后,我熟悉了基本的命令行操作,如`git init`,`git add`,`git commit`以及`git push`等。我还尝试了在本地创建仓库,并将一些简单的代码文件添加到版本控制中。此外,我还学习了如何在GitHub上创建新的仓库并进行远程同步。虽然一开始有些复杂,但随着实践的深入,我对Git的理解逐渐加深。
摘要由CSDN通过智能技术生成
今天是“ git 第一天”,和我“从零开始”吧!
1. 我用命令 rpm -qa|grep i git 查看一下我的机器是否安装了 git
[rocrocket@yhh ~]$ sudo su -
[root@wyhh ~]# rpm -qa|grep -i git
libcapseo-0.2.0-0.1.20080603gita6ec446.fc9.i386
libcaptury-0.3.0-0.1.20080323gitcca4e3c.fc9.i386
xorg-x11-drv-nouveau-0.0.10-2.20080408git0991281.fc9.i386
xorg-x11-drv-digitaledge-1.1.1-1.fc9.i386
此处 grep 命令使用 -i 是表示不区分大小写,这样的话无论是大写小写的 git/GIT/GiT… 都不会逃过 grep 的法眼。
结果发现了一些似乎使用 git 管理的开发项目,还有一些包含 git 字符的其他包,但就是没发现 git 包。看来我需要安装
一个!
2.如果使用 fedora 的 yum 来安装 git,应该是相当简单。如果你是 ubuntu,那就更简单了,用 apt-get 就可以。如果是gentoo 的话,我想可以用 emerge 吧。源码安装的话,大家可以参考 git官网看看。我当然毫无悬念的选择 yum:
[root@yhh ~]# yum list|grep ^git
git.i386 1.5.5.1-1.fc9 updates-newkey
git-all.i386 1.5.5.1-1.fc9 updates-newkey
git-arch.i386 1.5.5.1-1.fc9 updates-newkey
git-cvs.i386 1.5.5.1-1.fc9 updates-newkey
git-daemon.i386 1.5.5.1-1.fc9 updates-newkey
git-email.i386 1.5.5.1-1.fc9 updates-newkey
git-gui.i386 1.5.5.1-1.fc9 updates-newkey
git-svn.i386 1.5.5.1-1.fc9 updates-newkey
gitk.i386 1.5.5.1-1.fc9 updates-newkey
gitweb.i386 1.5.5.1-1.fc9 updates-newkey
此处的 grep 命令使用了 ^ 符号,表示后面的字符串需要在每行的最开头位置,于是我们得到了如上的一大串 git 软件包。
首先我能肯定的 git.i386 是必然需要安装的,它一定是 git 的主包,但诸如 all arch cvs 等等这些包到底是起什么作用呢?
我有些迷惑了。于是,不得不求助 baidu 了。
原来:
git 包是 git 的核心程序,它只包括最小的依赖关系,如果只安装 git 包的话,那么一些 git 的外围扩展将无法使用。
git-all 包包括了所有的集成在 git 上的外围扩展功能。安装了这个包,你就万事大吉了!
git-arch 包是为了兼容 arch 仓库的。大家或许听说过 linux 的发行版本 arch ,但现在说的 arch 和这个发行版本似乎没有必然关系。git-arch 中的 arch gnu arch ,它是一个类似于 cvs sccs svn 的版本控制系统。 git-arch 包用于支持从 gnuarch 仓库导入到 git 仓库。
git-cvs 包用于支持从 cvs 仓库导入到 git 仓库。
git-daemon 包用于支持用户使用 git:// 形式的命令来访问 git 仓库。
git-email 包支持使用 git 发送邮件。(这个功能用处在哪里呢?我也不太清楚。慢慢研究中… 如果哪位朋友会,在下面留个言)
git-gui 包是一个基于 Tk git 程序,也就是说是带有 GUI 的,可以用鼠标点击操作的 git
git-svn 包用于支持从 svn 仓库导入到 git 仓库。
gitk 包是一个带有 Tcl/Tk GUI 的可以用来浏览 git 仓库历史信息的桌面程序。(如果你对 git 仓库这个词没有概念的话,不要急,后面会说到。现在我们的目的就是要把 git 安装上。)
gitweb 包则是一个成熟的基于 web 的用于 git 仓库管理的 web 程序。
3.知道了每一个包的作用后,我们就来安装吧!
[root@yhh ~]# yum install git-all.i386
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
git-all i386 1.5.5.1-1.fc9 updates-newkey 9.0 k
Installing for dependencies:
cvsps i386 2.1-6.fc9 fedora 55 k
emacs-common i386 1:22.2-5.fc9 updates-newkey 19 M
emacs-git i386 1.5.5.1-1.fc9 updates-newkey 53 k
git i386 1.5.5.1-1.fc9 updates-newkey 3.5 M
git-arch i386 1.5.5.1-1.fc9 updates-newkey 28 k
git-cvs i386 1.5.5.1-1.fc9 updates-newkey 69 k
git-email i386 1.5.5.1-1.fc9 updates-newkey 28 k
git-gui i386 1.5.5.1-1.fc9 updates-newkey 177 k
git-svn i386 1.5.5.1-1.fc9 updates-newkey 71 k
gitk i386 1.5.5.1-1.fc9 updates-newkey 79 k
perl-Error noarch 1:0.17012-2.fc9 fedora 27 k

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值