git-game-v2

Second version of the terminal based game that teaches users git commands

  • 所有者: git-game/git-game-v2
  • 平台:
  • 许可证:
  • 分类:
  • 主题:
  • 喜欢:
    0
      比较:

Github星跟踪图

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.

主要指标

概览
名称与所有者git-game/git-game-v2
主编程语言Makefile
编程语言C++ (语言数: 4)
平台
许可证
所有者活动
创建于2015-06-08 19:38:55
推送于2023-05-17 00:15:39
最后一次提交2020-01-06 20:46:38
发布数25
最新版本名称return (发布于 2015-06-10 20:59:48)
第一版名称alt (发布于 2015-06-08 17:14:26)
用户参与
星数630
关注者数27
派生数86
提交数19.7k
已启用问题?
问题数8
打开的问题数8
拉请求数2
打开的拉请求数2
关闭的拉请求数5
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?