Git 有个练习 Git 的游戏,Githug

sectic · 2012年04月27日 · 最后由 felix_tian 回复于 2016年01月14日 · 10633 次阅读

gem install githug

我在第 10 关遇到问题。。。。我直接把一个文件 commit 了,结果回不到之前的状态,reset 等操作都不管用。

A file (deleteme.rb) has accidentally been added to your staging area, find out which file and remove it from the staging area. NOTE Do not remove the file system, only from git.

cool!! like game.

#1 楼 @googya 可以 hint 看看提示

#3 楼 @Juanito 是的,有提示。。但是我刚接触 git,有些操作不熟悉。比如,现在又遇到一个问题,第 27 关,要求是,保留一个分枝的一次提交提交到 master,然后删除那个分枝

#4 楼 @googya 說了就不好玩了! : )

啊哈..还是挺有趣的~~~ 我都会诶 ~~~ 除了 Unified diff 格式没看懂,, 搜到了这里 才明白的

可以去 contribute 一下....比如来个测试 bisect 的..

弱弱问下...第 19 关怎么过呢?

不错哈 推荐 git 新手玩玩 寓教于乐:)

#8 楼 @MBAACC

$ git pull origin master

正好玩到这

jhjguxin@jhjguxin-virtual-machine:~/git_hug$ githug
********************************************************************************
*                                    Githug                                    *
********************************************************************************
Congratulations, you have solved the level

Level: 35
Difficulty: ***

This is the final level, the goal is to contribute to this repository by making a pull request on Github.  Please note that this level is designed to encourage you to add a valid contribution to Githug, not testing your ability to create a pull request.  Contributions that are likely to be accepted are levels, bug fixes and improved documentation.


小生不才 要出国了 ~~~ 这个这个 最后一关 就不过了 嘿嘿 玩玩还行 写点什么就不成了难不成 弄个 攻略 pull 过去??

蛮有意思的

hoho 通关攻略出来咯,最好不要看。。。 http://fancyoung.com/blog/githug-cheat-sheet/

#11 楼 @jhjguxin 额。。。我 pull 了,中文的。。。

#10 楼 @siyang1982 =w=为毛我这里看不到远地的 origin 有 master 分支呢?git pull origin master 显示 Couldn't find remote ref master

#14 楼 @MBAACC 你还在那一关下?重置一下试试。 你可以打开.git/config文件看看

#15 楼 @siyang1982 我发现 config 里面是这样的: [remote "origin"] ... url = https://github.com/pull-this/thing-to-pull 于是我直接 git pull [email protected]:pull-this/thing-to-pull,然后就过了 thanks

#13 楼 @siyang1982 not testing your ability to create a pull request... 其实可以 pull 个中文翻译过去

哈哈 通关完毕睡觉去啦

有空玩下,呵呵

我在 level 14 先 git add forgotten.rb,然后 git commit --amend,为什么没用啊,githug 说不正确,求解啊,不然玩不下去啊。。。

#20 楼 @kosl90 同上,上次玩还好好的呢!

41 关是我心里的痛啊

各位大神,我在安装完 githug 后,再输入 githug 后,系统说没有相关命令。这是怎么回事?求各位指点一下。谢谢。

Name: commit_in_future Level: 20 Difficulty: **

Commit your changes with the future date (e.g. tomorrow). 这题 有人帮帮我吗,网上找的答案不正确

git commit --amend --date="Wed Feb 16 14:00 2037 +0100" #24 楼 @ccysfn git commit --amend --date="Wed Feb 16 14:00 2037 +0100"

需要 登录 后方可回复, 如果你还没有账号请 注册新账号