当前位置:网站首页>2022.07.11
2022.07.11
2022-07-27 20:31:00 【ifuudoudou】
Class hour 1 git brief introduction


The essential difference lies in , After the centralized central server hangs up , Other working computers cannot be used .
And distributed , Even if the central server hangs up , You can also use .
Class hour 3 Version creation


git It can help manage the code under a directory , But you must first execute an initialization command .

First of all use first mkdir git_test Create a directory .
then cd git_test/ Enter this directory .
use ls -al Check to see that there is almost nothing .

Use this time git init initialization .
And then you can see .
![]()
Initialize empty git The warehouse is located in this directory .
Use this time ls -al see , You can see that there is a hidden warehouse here .
Now you can use this repository to manage your code .

Here I was going to use the above two steps to build a version .

As a result, there was a prompt that my information was incomplete .

At this time, we need to use the commands mentioned here , To enter the user and email .


In this way, the version is created .
So how to view version records ?
use git log That's all right. .

In addition, the yellow font is the serial number of the version .
After re creating a version , Check it again , You will find two version information .

Class hour 4 Version rollback
When creating a version ,git What did you do ?
The first time you create a version .
At this time, a record will be made , Record that you created a code.txt, And what's inside .
Edit the file again for the second time , Add a line , Another version has been created .
At this time, there will be another record point . This is equivalent to our version 2.
And the recorded points will connect the versions into a line .

Note that it is not a complete copy , Just record the difference between you and the previous version .
that , If later I feel that the version 1 better , Want to return the version 1 What if ?
In the newly created version , There's a pointer , Will point to the latest version .
This pointer is called head.
So in the previous version , You can use it The following figure shows .


Back to a certain version , Directly use this pointer to command .

If you want to go back to version 2 Words , Copy version 2 The serial number of , Then use the command .
So if you can't see the version serial number , How about ?

We can find it by checking our own operation records .
The yellow font at the front of the record , It is the content of the version serial number .
So you can know the serial number , And use the method just now to return to the version .
Pay attention to , There must be two steps to create !!!
边栏推荐
- ES6--解构赋值
- 内置函数时间日期函数
- Pyqt5 rapid development and practice 4.5 button controls and 4.6 qcombobox (drop-down list box)
- JS realizes video recording - Take cesium as an example
- set--数据解构
- 速卖通:按关键字搜索商品 API
- Conversion of Oracle date
- Oracle simple advanced query
- 技术分享 | 接口自动化测试中,如何做断言验证?
- Illustration leetcode - 592. Fraction addition and subtraction (difficulty: medium)
猜你喜欢

PyQt5快速开发与实战 4.7 QSpinBox(计数器) and 4.8 QSlider(滑动条)

办公自动化解决方案——DocuWare Cloud 将应用程序和流程迁移到云端的完整的解决方案

盘点下互联网大厂的实习薪资:有了它,你也可以进厂

图解LeetCode——592. 分数加减运算(难度:中等)

学习Blender必备的12款动画插件,来了解一下

JS realizes video recording - Take cesium as an example

Redis-基本了解,五大基本数据类型

Oracle +JDBC

PyQt5快速开发与实战 4.5 按钮类控件 and 4.6 QComboBox(下拉列表框)

C语言--数组
随机推荐
uva1377
PyQt5快速开发与实战 4.5 按钮类控件 and 4.6 QComboBox(下拉列表框)
API for obtaining the latest raw data of Taobao app product details
最新获得淘宝app商品详情原数据 的API
2019年中国智能机市场:华为拿下近4成份额,稳坐国内第一
预处理与宏定义
What is a multi-layer perceptron (what is a multi-layer perceptron)
JS realizes video recording - Take cesium as an example
Source code analysis of Chang'an chain data storage
Two years after its release, the price increased by $100, and the reverse growth of meta Quest 2
Oracle Xe installation and user operation
Clickhouse 实现 MaterializedPostgreSQL
华为手机出货超苹果成全球第二,但面临大量库存需要清理
Clickhouse implements materializedpostgresql
CONDA common commands
Add joint control to gltf model
JS array method foreach and map comparison
Express: search product API by keyword
ZJNU 22-07-26 competition experience
京东:按关键字搜索商品 API