标签:style http io ar os 使用 sp for 文件
首先切到Terminal下
安装游戏 sudo gem install githug
LiGuicaideMacBook-Pro:~ Guicai$ gem install githug Fetching: mime-types-1.25.1.gem (100%) ERROR: While executing gem ... (Gem::FilePermissionError) You don‘t have write permissions for the /Library/Ruby/Gems/2.0.0 directory. LiGuicaideMacBook-Pro:~ Guicai$ sudo gem install githug Password: Fetching: mime-types-1.25.1.gem (100%) Successfully installed mime-types-1.25.1 Fetching: diff-lcs-1.2.5.gem (100%) Successfully installed diff-lcs-1.2.5 Fetching: grit-2.3.0.gem (100%) Successfully installed grit-2.3.0 Fetching: thor-0.14.6.gem (100%) Successfully installed thor-0.14.6 Fetching: githug-0.4.2.gem (100%) Successfully installed githug-0.4.2 Parsing documentation for mime-types-1.25.1 Installing ri documentation for mime-types-1.25.1 Parsing documentation for diff-lcs-1.2.5 Installing ri documentation for diff-lcs-1.2.5 Parsing documentation for grit-2.3.0 Installing ri documentation for grit-2.3.0 Parsing documentation for thor-0.14.6 Installing ri documentation for thor-0.14.6 Parsing documentation for githug-0.4.2 Installing ri documentation for githug-0.4.2 5 gems installed
因为初次使用,直接敲githug
LiGuicaideMacBook-Pro:~ Guicai$ githug ******************************************************************************** * Githug * ******************************************************************************** No githug directory found, do you wish to create one? [yn] y Welcome to Githug! Name: init Level: 1 Difficulty: * A new directory, `git_hug`, has been created; initialize an empty repository in it.
华丽的分割线,从此开始了游戏之旅
第一题:切换到git_hug目录下,初始化
LiGuicaideMacBook-Pro:git_hug Guicai$ git init
做完之后,输入githug play
LiGuicaideMacBook-Pro:git_hug Guicai$ githug play ******************************************************************************** * Githug * ******************************************************************************** Congratulations, you have solved the level! Name: config Level: 2 Difficulty: * Set up your git name and email, this is important so that your commits can be identified.
第二题:设置名字跟邮箱
LiGuicaideMacBook-Pro:git_hug Guicai$ git config --global user.name "Guicai.Li" LiGuicaideMacBook-Pro:git_hug Guicai$ git config --global user.email guicai.li.china@gmail.com LiGuicaideMacBook-Pro:git_hug Guicai$ githug play ******************************************************************************** * Githug * ******************************************************************************** What is your name? Guicai.Li What is your email? guicai.li.china@gmail.com Your config has the following name: Guicai.Li Your config has the following email: guicai.li.china@gmail.com Congratulations, you have solved the level! Name: add Level: 3 Difficulty: * There is a file in your folder called `README`, you should add it to your staging area Note: You start each level with a new repo. Don‘t look for files from the previous one.
第三题:将README文件添加到git上
LiGuicaideMacBook-Pro:git_hug Guicai$ git add README LiGuicaideMacBook-Pro:git_hug Guicai$ githug play ******************************************************************************** * Githug * ******************************************************************************** Congratulations, you have solved the level! Name: commit Level: 4 Difficulty: * The `README` file has been added to your staging area, now commit it.
第四题:提交README
LiGuicaideMacBook-Pro:git_hug Guicai$ git commit -a -m ‘Hello,GitHug‘ [master (root-commit) 3ad4189] Hello,GitHug 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 README LiGuicaideMacBook-Pro:git_hug Guicai$ githug play ******************************************************************************** * Githug * ******************************************************************************** Congratulations, you have solved the level! Name: clone Level: 5 Difficulty: * Clone the repository at https://github.com/Gazler/cloneme.
第五题:clone代码
==============
先睡觉了,明天继续,要上班啊。。。
标签:style http io ar os 使用 sp for 文件
原文地址:http://my.oschina.net/CgShare/blog/348003