当前位置:网站首页>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 !!!
边栏推荐
- Preprocessing and macro definition
- [RCTF2015]EasySQL-1|SQL注入
- What is a multi-layer perceptron (what is a multi-layer perceptron)
- YY English learning about fish
- Learn about the 12 necessary animation plug-ins of blender
- IE11 下载doc pdf等文件的方法
- ZJNU 22-07-26 比赛心得
- Anfulai embedded weekly report no. 275: 2022.07.18--2022.07.24
- Redis queue、rdb学习
- Clickhouse 实现 MaterializedPostgreSQL
猜你喜欢

Illustration leetcode - 592. Fraction addition and subtraction (difficulty: medium)

Ten year test old bird talk about mobile terminal compatibility test

Data warehouse construction - DWD floor

To share the denoising methods and skills of redshift renderer, you must have a look

antdv: Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key

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

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

YY English learning about fish

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

OA项目之我的审批(查询&会议签字)
随机推荐
Huawei connect conference 2022 opens Bangkok trip; Facebook pushes the video revenue sharing function, and the creator can get 20% share
C语言pow函数(c语言中指数函数怎么打)
Clickhouse implements materializedpostgresql
康佳首批10万颗存储主控芯片售罄,2020年预计销量1亿颗
GLTF模型添加关节控制
Unity2d dynamic cartoon script (animation demonstration II for the chapter of Tiger Bridge)
Kubectl's access to pod logs -- the way to build a dream
It is said that Intel will stop the nervana chip manufactured by TSMC at 16nm
LG Group announced that it would donate 3million yuan in cash, 1.2 million masks and 10000 sets of protective clothing to Hubei
MLX90640 红外热成像仪测温传感器模块开发笔记(七)
Ten year test old bird talk about mobile terminal compatibility test
Assignment 1 - Hello World ! - Simple thread Creation
'vite' is not an internal or external command, nor is it a runnable program or batch file
antdv: Each record in table should have a unique `key` prop,or set `rowKey` to an unique primary key
汇顶科技:收购恩智浦VAS业务已完成交割
ZJNU 22-07-26 比赛心得
Check the internship salary of Internet companies: with it, you can also enter the factory
uva1421
联发科发布中端游戏手机芯片Helio G80
MongoDB 学习笔记: BSON 结构分析