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:
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!
The first level demonstrates the power of
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
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.