forked from gdut-dynamic-x/missing-semester
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #59 from Bluefairy-ljy/master
prhomework
- Loading branch information
Showing
11 changed files
with
32 additions
and
3 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# **Git过程总结** | ||
## 一.了解Git的宏观框架 | ||
1. 1.Git是目前世界上最先进的分布式版本控制系统,其核心功能是版本控制,它允许你跟踪文件变化,保存不同版本的文件,并且在需要时回退到任一历史版本。亮点:版本控制、分支管理、协作开发 | ||
2. 2.通过流程图了解到Git的工作原理 | ||
## 二.Workspace Index/Stage Repository | ||
1. 1.学习基本操作 | ||
如'git init':在当前目录下创建一个名为.git的隐藏目录,其中包含Git仓库的所有元数据和对象,用于跟踪文件 | ||
'git add':将文件添加到暂存区,准备提交 | ||
'git commit':将暂存区的文件提交到Git仓库,创建一个新的版本 | ||
... | ||
2. 2.理解分支管理 | ||
几乎每一种版本控制系统都以某种形式支持分支。使用分支意味着你可以从开发主线上分离开来,然后在不影响主线的同时继续工作。 | ||
## 三.Github | ||
1. 1.学会创建仓库并设置参数,生成SSH密钥加强与远程仓库的交互安全 | ||
2. 2.以Github作为桥梁支持协作开发 | ||
|
||
|
||
##我终于完成辣! | ||
1. 讲真的摸索Github的过程相当有挑战性,摸索完发现它效率还挺高的 | ||
2. 其实很担心犯错,不过也确实犯错了,学到了更多东西 | ||
3. pr顺利hh |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# git 应用 | ||
###### Q1:若你已经修改了部分文件,并且将其中的一部分加入了暂存区,应该如何回退这些修改,恢复到修改前最后一次提交的状态?给出至少两种不同的方式 | ||
方式1:使用 git reset --hard 命令 ![相关操作图片](git reset --hard 1.png) | ||
方式2:使用 git checkout 命令 ![相关操作图片](git checkout.) | ||
###### Q2:若你已经提交了一个新版本,需要回退该版本,应该如何操作?分别给出不修改历史或修改历史的至少两种不同的方式 | ||
方式1(不修改历史):使用 git reset --soft 命令![相关操作图片](git reset --soft) | ||
方式2(不修改历史):使用 git revert 命令 ![相关操作图片](git revert) ![相关操作图片](2024-11-09 15-59-58屏幕截图) | ||
方式3(修改历史):使用 git reset --hard 命令 ![相关操作图片](git reset --hard 2.png) | ||
###### Q3:我们已经知道了合并分支可以使用merge,但这不是唯一的方法,给出至少两种不同的合并分支的方式 | ||
方式1:使用 git merge 命令(题目给的也算个方式吧hhh) ![相关操作图片](git merge) | ||
方式2:使用 git rebase 命令(这边浅浅skip当逃兵了,file2要合并的话得解决冲突) ![相关操作图片](git rebase) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters