ubuntu下的git版本创建

一、git的特点

二、gei的安装和配置

1、安装命令如下

sudo apt-get install git

2、安装成功后输入

git

3、创建版本库

git init

4、使用

先创建一个txt文件

gedit code.txt
git add code.txt
git commit -m '版本1'

出现错误

*** 请告诉我你是谁。

运行

git config --global user.email "[email protected]"
git config --global user.name "Your Name"

来设置您账号的缺省身份标识。
如果仅在本仓库设置身份标识,则省略 --global 参数。

然后设置你的用户名和邮箱

git config --global user.email ""
git config --global user.name ""

在输入

git commit -m '版本1'

 4、版本后退和前进

1 git reset --hard HEAD~1

  

猜你喜欢

转载自www.cnblogs.com/a595452248/p/10712880.html