Skip to content
项目

关于

一款基于终端的游戏的第二版,通过游戏教用户使用 Git 命令。

游戏与模拟器

这些数字如何统计

实测星标增长

24小时
0
7天
0
15天
0
1个月
正在收集历史

各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。

README.md

原文

Run on Repl.it

#git-game-v2

This repo is the sequel to the git-game. There are nine levels, and each level teaches you about one of git's more advanced features. In particular, you'll learn how to use the commands:

  • git ls-files
  • git cherry-pick
  • git bisect
  • git show
  • git shortlog
  • git submodule
  • git describe
  • git log
  • git grep

Let’s begin! First, clone this repository using the command below:

$ git clone https://github.com/git-game/git-game-v2.git

You can win a badge for completing this game! learn more about badges here: https://openbadgefactory.com/faq

You're now ready to start level1. Good luck!

##Level 1

The first level demonstrates the power of git ls-files. Running git ls-files lists all the files in the current commit. Checkout the documentation for more details. Can you figure out why running the standard Unix ls doesn't list all the files in the current commit?

Your task for this level is to use git ls-files to count the total number of lines in this commit. In other words, count the number of lines in each file, then add all these numbers together to get the total.

To advance to level 2 you need to checkout the branch named after the total. So if the total number is 780 then you would run:

$ git checkout 780

Hint: You will need to combine git ls-files with other Unix utilities using pipes. This stackoverflow question has a useful example that will get you started.

探索相关项目

加载中…