Skip to content
🌿

Git 基础

150 道练习

从 git init 到 rebase 的 150 道版本控制练习,覆盖暂存区、分支策略、远程协作与冲突解决等日常高频操作。

  1. 1

    Git 添加 Command 测验

    测试你的理解的 什么 git 添加 command 做 in Git workflow.

    单选题 入门
  2. 2

    Stage 所有更改练习

    练习 using git 添加使用点 shortcut 到 stage 所有 files at 一次.

    填空题 简单
  3. 3

    理解 Git 提交

    检查你的 conceptual 理解的 什么 Git 提交 represents.

    概念检查 入门
  4. 4

    Spot Git 提交 Mistake

    查找错误 in git 提交 command 使用 multi-word 消息.

    找错误 简单
  5. 5

    Git 状态 Command 测验

    测试你的 knowledge 的什么信息 git 状态 command displays.

    单选题 入门
  6. 6

    Git Log Command 测验

    测试你的理解的 什么 git log command displays.

    单选题 入门
  7. 7

    Show Recent 提交练习

    练习 using git log 使用 flag 到限制数字的 提交 shown.

    填空题 简单
  8. 8

    什么是 Git 测验

    测试你的理解的 什么 Git 是 and 什么 problem 它解决.

    单选题 入门
  9. 9

    仓库概念测验

    检查你的理解的 什么 Git 仓库包含.

    单选题 入门
  10. 10

    Git Init 测验

    测试你的 knowledge 的什么 git init command 做.

    单选题 入门
  11. 11

    Git 克隆测验

    测试你的理解的 什么 git 克隆做.

    单选题 入门
  12. 12

    推送对比拉取测验

    Distinguish 之间 git 推送 and git 拉取.

    单选题 简单
  13. 13

    Git 分支测验

    测试你的 knowledge 的什么分支 represents in Git.

    单选题 简单
  14. 14

    Git 合并测验

    测试你的理解的 什么合并做.

    单选题 简单
  15. 15

    Git Checkout 测验

    测试你的 knowledge 的什么 git checkout 做.

    单选题 简单
  16. 16

    Git Stash 测验

    测试你的理解的 什么 git stash 做.

    单选题 中等
  17. 17

    Git Diff 测验

    测试你的 knowledge 的什么 git diff shows.

    单选题 简单
  18. 18

    Git Revert 测验

    测试你的理解的 什么 git revert 做.

    单选题 中等
  19. 19

    Git Reset 模式测验

    测试你的 knowledge 的不同 git reset 模式.

    单选题 中等
  20. 20

    Gitignore 测验

    测试你的理解的 什么 .gitignore 做.

    单选题 入门
  21. 21

    合并 Conflict Markers 测验

    测试你的 knowledge 的合并 conflict marker 语法.

    单选题 中等
  22. 22

    Git Flow 分支测验

    测试你的 knowledge 的 Git Flow branching model.

    单选题 中等
  23. 23

    拉取请求测验

    测试你的理解的 什么拉取请求是.

    单选题 简单
  24. 24

    Code Review Purpose 测验

    测试你的理解的 为什么 code reviews matter.

    单选题 简单
  25. 25

    Git Remote 测验

    测试你的 knowledge 的 git remote commands.

    单选题 中等
  26. 26

    获取对比拉取测验

    Distinguish 之间 git 获取 and git 拉取.

    单选题 中等
  27. 27

    Git Rebase 测验

    测试你的理解的 什么 git rebase 做.

    单选题 中等
  28. 28

    Cherry-选取测验

    测试你的 knowledge 的什么 git cherry-选取做.

    单选题 中等
  29. 29

    Git 标签测验

    测试你的理解的 什么标签是 used for in Git.

    单选题 简单
  30. 30

    Git Hook 测验

    测试你的 knowledge 的什么 Git Hook 是.

    单选题 中等
  31. 31

    GitHub 操作测验

    测试你的理解的 什么 GitHub 操作做.

    单选题 中等
  32. 32

    提交消息最佳实践测验

    测试你的 knowledge 的好 提交消息练习.

    单选题 简单
  33. 33

    分支 Naming 测验

    测试你的 knowledge 的好 分支 naming 约定.

    单选题 简单
  34. 34

    Reset --困难测验

    测试你的理解的 git reset --困难.

    单选题 中等
  35. 35

    Force 推送测验

    测试你的理解的 git 推送 --force.

    单选题 中等
  36. 36

    快-向前合并测验

    测试你的理解的 快-向前合并.

    单选题 中等
  37. 37

    提交 Frequency 测验

    测试你的 knowledge 的好 提交练习.

    单选题 简单
  38. 38

    Predict Init 输出

    Predict 什么 git init prints 当运行 in 新空 directory.

    预测输出 入门
  39. 39

    Predict 状态之后 Init

    Predict 输出的 git 状态 in freshly initialized 仓库.

    预测输出 入门
  40. 40

    Predict 状态之后添加

    Predict git 状态输出之后 staging 新 file.

    预测输出 简单
  41. 41

    Predict Log 之后首先提交

    Predict 什么 git log shows 之后首先提交.

    预测输出 简单
  42. 42

    Predict 分支列表

    Predict 输出的 git 分支之后创建分支.

    预测输出 简单
  43. 43

    Predict Checkout 输出

    Predict 什么 happens 当你 checkout 新分支使用 -b.

    预测输出 简单
  44. 44

    Predict Stash 列表

    Predict 什么 git stash 列表 shows 之后 stashing 更改.

    预测输出 中等
  45. 45

    Predict Diff 输出

    Predict 什么 git diff shows for 修改 file.

    预测输出 简单
  46. 46

    Predict 合并 Result

    Predict outcome 的快-向前合并.

    预测输出 中等
  47. 47

    Predict Revert Result

    Predict 什么 happens 当你 revert 提交.

    预测输出 中等
  48. 48

    Predict Reset --soft Result

    Predict 副作用的 git reset --soft HEAD~1.

    预测输出 中等
  49. 49

    Predict Ignored File 状态

    Predict git 状态输出当 file matches .gitignore.

    预测输出 简单
  50. 50

    Predict Remote 添加 Result

    Predict 输出的 git remote -v 之后添加 remote.

    预测输出 中等
  51. 51

    Predict 获取 Behavior

    Predict 什么更改之后运行 git 获取.

    预测输出 中等
  52. 52

    Predict 标签列表

    Predict 输出的 git 标签之后创建标签.

    预测输出 简单
  53. 53

    Predict Cherry-选取 Result

    Predict result 的 cherry-选取提交.

    预测输出 中等
  54. 54

    Predict Rebase Conflict

    Predict 什么 happens 当 rebase encounters conflict.

    预测输出 中等
  55. 55

    Predict Log --oneline 数量

    Predict 如何许多行 git log --oneline shows.

    预测输出 简单
  56. 56

    Predict Stash Pop

    Predict 什么 happens 当你 pop stash.

    预测输出 中等
  57. 57

    Predict 分支删除

    Predict result 的删除 fully 合并分支.

    预测输出 中等
  58. 58

    Initialize 仓库 Fill

    Fill in 空白到 initialize 新 Git 仓库.

    填空题 入门
  59. 59

    克隆仓库 Fill

    Fill in 空白到 克隆 remote 仓库.

    填空题 入门
  60. 60

    提交使用消息 Fill

    Fill in 空白到 提交使用消息.

    填空题 入门
  61. 61

    创建分支 Fill

    Fill in 空白到 创建 and 切换到 新分支.

    填空题 简单
  62. 62

    推送使用 Upstream Fill

    Fill in 空白到 设置 tracking on 首先推送.

    填空题 中等
  63. 63

    Oneline Log Fill

    Fill in 空白到 show compact one-行-每-提交 log.

    填空题 简单
  64. 64

    Stash Pop Fill

    Fill in 空白到 restore stashed 更改.

    填空题 中等
  65. 65

    Staged Diff Fill

    Fill in 空白到 see staged 更改 in diff.

    填空题 中等
  66. 66

    添加 Remote Fill

    Fill in 空白到 添加新 remote 仓库.

    填空题 中等
  67. 67

    Annotated 标签 Fill

    Fill in 空白到 创建 annotated 标签.

    填空题 中等
  68. 68

    Revert 提交 Fill

    Fill in 空白到 revert 最后提交.

    填空题 中等
  69. 69

    困难 Reset Fill

    Fill in 空白到 discard 所有更改 and match HEAD.

    填空题 中等
  70. 70

    Ignore 模式 Fill

    Fill in 空白到 ignore 所有 .环境 files.

    填空题 简单
  71. 71

    获取所有 Remotes Fill

    Fill in 空白到 获取从 所有 remotes.

    填空题 中等
  72. 72

    Abort Rebase Fill

    Fill in 空白到 取消 in-progress rebase.

    填空题 中等
  73. 73

    Cherry-选取 Fill

    Fill in 空白到 apply 特定提交.

    填空题 中等
  74. 74

    列表所有分支 Fill

    Fill in 空白到 列表两者都局部 and remote 分支.

    填空题 简单
  75. 75

    Force 使用 Lease Fill

    Fill in 空白到 safely force 推送.

    填空题 中等
  76. 76

    图 Log Fill

    Fill in 空白到 show visual 分支图.

    填空题 中等
  77. 77

    否快-向前 Fill

    Fill in 空白到 force 合并提交.

    填空题 中等
  78. 78

    Spot 添加 Mistake

    查找错误 in git 添加 command.

    找错误 简单
  79. 79

    Spot 克隆 Mistake

    查找错误 in git 克隆 command.

    找错误 简单
  80. 80

    Spot 分支 Mistake

    查找错误 in 分支切换 command.

    找错误 简单
  81. 81

    Spot 推送 Mistake

    查找错误 in 首先-推送 command.

    找错误 中等
  82. 82

    Spot Reset Mistake

    查找危险 in 这个 reset command.

    找错误 中等
  83. 83

    Spot Gitignore Mistake

    查找错误 in .gitignore 模式.

    找错误 简单
  84. 84

    Spot 合并 Mistake

    查找错误 in 合并 command 序列.

    找错误 中等
  85. 85

    Spot Rebase Mistake

    查找危险 in 这个 rebase command.

    找错误 中等
  86. 86

    Spot 提交消息 Mistake

    查找 issue 使用这个提交消息样式.

    找错误 简单
  87. 87

    Spot Stash Mistake

    查找错误 in stash workflow.

    找错误 中等
  88. 88

    Spot Remote Mistake

    查找错误 in remote 推送 command.

    找错误 中等
  89. 89

    Spot 标签推送 Mistake

    查找错误 in pushing 标签到 remote.

    找错误 中等
  90. 90

    Spot Workflow Mistake

    查找坏 练习 in 这个 workflow.

    找错误 中等
  91. 91

    Centralized 对比 Distributed 概念

    检查你的理解的 distributed version control.

    概念检查 中等
  92. 92

    Staging 区域概念

    检查你的理解的 three-区域 Git model.

    概念检查 中等
  93. 93

    提交 Immutability 概念

    检查你的理解的 提交 immutability.

    概念检查 中等
  94. 94

    分支指针概念

    检查你的理解的 如何分支工作 internally.

    概念检查 中等
  95. 95

    Three-方式合并概念

    检查你的理解的 three-方式合并.

    概念检查 中等
  96. 96

    Reset 对比 Revert 概念

    检查你的理解的 reset 对比 revert.

    概念检查 中等
  97. 97

    Rebase History 概念

    检查你的理解的 如何 rebase affects history.

    概念检查 中等
  98. 98

    Fork 对比克隆概念

    检查你的理解的 Fork 对比克隆.

    概念检查 中等
  99. 99

    Feature 分支概念

    检查你的理解的 feature 分支 workflow.

    概念检查 简单
  100. 100

    Atomic 提交概念

    检查你的理解的 atomic 提交.

    概念检查 中等
  101. 101

    Git 用途

    Git 主要用于什么?

    单选题 入门
  102. 102

    git init 用途

    git init 做什么?

    单选题 入门
  103. 103

    git add 暂存

    git add 做什么?

    单选题 入门
  104. 104

    git commit 用途

    git commit 做什么?

    单选题 入门
  105. 105

    git status 信息

    git status 显示什么?

    单选题 入门
  106. 106

    git branch 用途

    git branch feature 做什么?

    单选题 简单
  107. 107

    git merge 类型

    git merge 做什么?

    单选题 简单
  108. 108

    git push 用途

    git push 做什么?

    单选题 简单
  109. 109

    git pull 用途

    git pull 做什么?

    单选题 简单
  110. 110

    git clone 用途

    git clone 做什么?

    单选题 入门
  111. 111

    git log 用途

    git log 显示什么?

    单选题 简单
  112. 112

    git reset --hard

    git reset --hard 做什么?

    单选题 中等
  113. 113

    git stash 用途

    git stash 做什么?

    单选题 中等
  114. 114

    gitignore 用途

    .gitignore 做什么?

    单选题 简单
  115. 115

    合并冲突原因

    何时发生合并冲突?

    单选题 中等
  116. 116

    Pull Request 用途

    什么是 Pull Request?

    单选题 简单
  117. 117

    HEAD 引用

    Git 中 HEAD 指什么?

    单选题 中等
  118. 118

    git diff 用途

    git diff 显示什么?

    单选题 简单
  119. 119

    git rebase 用途

    git rebase 做什么?

    单选题 中等
  120. 120

    git tag 用途

    Git tag 用于什么?

    单选题 中等
  121. 121

    git remote add

    git remote add origin <url> 做什么?

    单选题 简单
  122. 122

    git checkout 文件

    git checkout -- file 做什么?

    单选题 中等
  123. 123

    git fetch 与 pull

    git fetch 与 pull 有何不同?

    单选题 中等
  124. 124

    git commit --amend

    git commit --amend 做什么?

    单选题 中等
  125. 125

    分离 HEAD

    什么是分离 HEAD 状态?

    单选题 中等
  126. 126

    git revert 用途

    git revert 与 git reset 有何不同?

    单选题 中等
  127. 127

    暂存区概念

    什么是 Git 暂存区?

    单选题 中等
  128. 128

    git blame 用途

    git blame 显示什么?

    单选题 简单
  129. 129

    git cherry-pick

    git cherry-pick 做什么?

    单选题 中等
  130. 130

    Git 最佳实践

    哪个是好的 Git 提交消息实践?

    单选题 简单
  131. 131

    git status 输出

    预测输出。

    预测输出 入门
  132. 132

    git add .

    预测输出。

    预测输出 入门
  133. 133

    git commit 输出

    预测输出。

    预测输出 入门
  134. 134

    git branch 列表

    预测输出。

    预测输出 简单
  135. 135

    git log --oneline

    预测输出。

    预测输出 简单
  136. 136

    git diff --staged

    预测输出。

    预测输出 简单
  137. 137

    git remote -v

    预测输出。

    预测输出 简单
  138. 138

    git stash list

    预测输出。

    预测输出 中等
  139. 139

    git tag 列表

    预测输出。

    预测输出 简单
  140. 140

    git show HEAD

    预测输出。

    预测输出 中等
  141. 141

    git branch --show-current

    预测输出。

    预测输出 简单
  142. 142

    git config user.name

    预测输出。

    预测输出 简单
  143. 143

    git rev-parse HEAD

    预测输出。

    预测输出 中等
  144. 144

    git merge 快进

    预测输出。

    预测输出 中等
  145. 145

    git ls-files

    预测输出。

    预测输出 中等
  146. 146

    git rev-list --count

    预测输出。

    预测输出 中等
  147. 147

    git show --stat

    预测输出。

    预测输出 中等
  148. 148

    git symbolic-ref

    预测输出。

    预测输出 中等
  149. 149

    git describe

    预测输出。

    预测输出 中等
  150. 150

    git shortlog

    预测输出。

    预测输出 中等

动手做项目

通过引导式项目应用所学,含起始代码与解决方案。

查看项目