mygithug 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +22 -4
- data/levels/add.rb +1 -0
- data/levels/alias_lg.rb +1 -0
- data/levels/alias_st.rb +1 -0
- data/levels/bisect.rb +1 -0
- data/levels/bisect/prog.rb +1 -0
- data/levels/bisect/test.rb +1 -0
- data/levels/blame.rb +1 -0
- data/levels/blame/config.rb +1 -0
- data/levels/branch.rb +1 -0
- data/levels/branch_at.rb +1 -0
- data/levels/checkout.rb +1 -0
- data/levels/checkout_file.rb +1 -0
- data/levels/checkout_tag.rb +1 -0
- data/levels/checkout_tag_over_branch.rb +1 -0
- data/levels/cherry-pick.rb +1 -0
- data/levels/clone.rb +1 -0
- data/levels/clone_to_folder.rb +1 -0
- data/levels/commit.rb +1 -0
- data/levels/commit_amend.rb +1 -0
- data/levels/commit_in_future.rb +1 -0
- data/levels/config.rb +1 -0
- data/levels/conflict.rb +1 -0
- data/levels/congratulation.rb +1 -0
- data/levels/contribute.rb +1 -0
- data/levels/delete_branch.rb +2 -1
- data/levels/diff.rb +1 -0
- data/levels/diff/app.rb +1 -0
- data/levels/fetch.rb +1 -0
- data/levels/find_old_branch.rb +1 -0
- data/levels/grep.rb +1 -0
- data/levels/grep/app.rb +1 -0
- data/levels/grep/config.rb +1 -0
- data/levels/ignore.rb +1 -0
- data/levels/include.rb +1 -0
- data/levels/init.rb +1 -0
- data/levels/log.rb +1 -0
- data/levels/merge.rb +1 -0
- data/levels/merge_squash.rb +1 -0
- data/levels/number_of_files_committed.rb +1 -0
- data/levels/pull.rb +1 -0
- data/levels/pull_rebase.rb +1 -0
- data/levels/push.rb +1 -0
- data/levels/push_branch.rb +1 -0
- data/levels/push_tags.rb +1 -0
- data/levels/rebase.rb +1 -0
- data/levels/rebase_conflict.rb +1 -0
- data/levels/rebase_onto.rb +1 -0
- data/levels/remote.rb +1 -0
- data/levels/remote_add.rb +1 -0
- data/levels/remote_url.rb +1 -0
- data/levels/rename.rb +1 -0
- data/levels/rename_commit.rb +1 -0
- data/levels/reorder.rb +1 -0
- data/levels/repack.rb +1 -0
- data/levels/reset.rb +1 -0
- data/levels/reset_soft.rb +1 -0
- data/levels/restore.rb +1 -0
- data/levels/restructure.rb +1 -0
- data/levels/revert.rb +1 -0
- data/levels/rm.rb +1 -0
- data/levels/rm_cached.rb +1 -0
- data/levels/squash.rb +1 -0
- data/levels/stage_lines.rb +1 -0
- data/levels/stash.rb +1 -0
- data/levels/status.rb +1 -0
- data/levels/submodule.rb +1 -0
- data/levels/tag.rb +1 -0
- data/levels/unstash.rb +1 -0
- data/lib/githug.rb +1 -0
- data/lib/githug/cli.rb +1 -0
- data/lib/githug/extensions/grit/ruby1.9.rb +1 -0
- data/lib/githug/game.rb +1 -0
- data/lib/githug/level.rb +1 -0
- data/lib/githug/profile.rb +1 -0
- data/lib/githug/repository.rb +1 -0
- data/lib/githug/ui.rb +1 -0
- data/lib/githug/version.rb +2 -1
- data/spec/githug/cli_spec.rb +1 -0
- data/spec/githug/game_spec.rb +1 -0
- data/spec/githug/level_spec.rb +1 -0
- data/spec/githug/profile_spec.rb +1 -0
- data/spec/githug/repository_spec.rb +1 -0
- data/spec/githug/ui_spec.rb +1 -0
- data/spec/githug_spec.rb +1 -0
- data/spec/spec_helper.rb +1 -0
- data/spec/support/files/test_level.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62d787167c277a450a0d1eba48e0f54d3add9415
|
4
|
+
data.tar.gz: 20c4b32c0d6f0449c7706c1f5b86cf91cb81959b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 218caca027d11f692cb63de0cec81e1405763628eaa1f86e86fde9789e2e2f5947fa53787c5cfd93f90952e14ad9697332d04c133ccada1b69327895d86cb600
|
7
|
+
data.tar.gz: ce73b2bf121b3a51870b1b998a429c9ff91c15dcdb6255bcc3dfe9418ab3ecbd20d9d800e63050a756d95a25cea9356697462daf7b1642d2f421bb328be7272a
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# MyGithug
|
2
2
|
玩游戏一样练习Git操作。
|
3
3
|
|
4
|
-
[![Build Status](https://travis-ci.org/meixuesong/githug?branch=master)](https://travis-ci.org/meixuesong/githug)
|
5
|
-
|
6
4
|
## About
|
7
5
|
|
8
6
|
MyGithub是基于 [Githug](https://github.com/Gazler/githug) 修改的一个练习Git的项目。
|
@@ -30,13 +28,13 @@ ruby --version
|
|
30
28
|
|
31
29
|
如果没有权限,你可能需要以管理员身份运行。或者在Linux/Mac下 `sudo`:
|
32
30
|
|
33
|
-
sudo gem install
|
31
|
+
sudo gem install mygithug
|
34
32
|
|
35
33
|
### 开始游戏
|
36
34
|
|
37
35
|
建议你为此游戏创建一个新的文件夹,然后在该文件夹下运行命令:
|
38
36
|
|
39
|
-
|
37
|
+
mygithug
|
40
38
|
|
41
39
|
按照提示,系统会创建一个git_hug文件夹。
|
42
40
|
|
@@ -53,3 +51,23 @@ Type `y` (yes) to continue, `n` (no) to cancel and quit Githug.
|
|
53
51
|
* reset - 重置命令,将当前任务恢复到初始状态。
|
54
52
|
* levels - 列出所有的游戏级别。
|
55
53
|
|
54
|
+
常用命令示例:
|
55
|
+
|
56
|
+
默认命令 play
|
57
|
+
```
|
58
|
+
> mygithug play
|
59
|
+
或者
|
60
|
+
> mygithug
|
61
|
+
```
|
62
|
+
|
63
|
+
提示信息 hint
|
64
|
+
|
65
|
+
```
|
66
|
+
> mygithug hint
|
67
|
+
```
|
68
|
+
|
69
|
+
重置第3关 reset
|
70
|
+
|
71
|
+
```
|
72
|
+
> mygithug reset 3
|
73
|
+
```
|
data/levels/add.rb
CHANGED
data/levels/alias_lg.rb
CHANGED
data/levels/alias_st.rb
CHANGED
data/levels/bisect.rb
CHANGED
data/levels/bisect/prog.rb
CHANGED
data/levels/bisect/test.rb
CHANGED
data/levels/blame.rb
CHANGED
data/levels/blame/config.rb
CHANGED
data/levels/branch.rb
CHANGED
data/levels/branch_at.rb
CHANGED
data/levels/checkout.rb
CHANGED
data/levels/checkout_file.rb
CHANGED
data/levels/checkout_tag.rb
CHANGED
data/levels/cherry-pick.rb
CHANGED
data/levels/clone.rb
CHANGED
data/levels/clone_to_folder.rb
CHANGED
data/levels/commit.rb
CHANGED
data/levels/commit_amend.rb
CHANGED
data/levels/commit_in_future.rb
CHANGED
data/levels/config.rb
CHANGED
data/levels/conflict.rb
CHANGED
data/levels/congratulation.rb
CHANGED
data/levels/contribute.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
difficulty 3
|
2
3
|
description "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."
|
3
4
|
|
data/levels/delete_branch.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
difficulty 2
|
2
3
|
|
3
4
|
description "You have created too many branches for your project. There is an old branch in your repo called 'delete_me', you should delete it."
|
@@ -12,4 +13,4 @@ end
|
|
12
13
|
|
13
14
|
hint do
|
14
15
|
puts "Running 'git --help branch' will give you a list of branch commands."
|
15
|
-
end
|
16
|
+
end
|
data/levels/diff.rb
CHANGED
data/levels/diff/app.rb
CHANGED
data/levels/fetch.rb
CHANGED
data/levels/find_old_branch.rb
CHANGED
data/levels/grep.rb
CHANGED
data/levels/grep/app.rb
CHANGED
data/levels/grep/config.rb
CHANGED
data/levels/ignore.rb
CHANGED
data/levels/include.rb
CHANGED
data/levels/init.rb
CHANGED
data/levels/log.rb
CHANGED
data/levels/merge.rb
CHANGED
data/levels/merge_squash.rb
CHANGED
data/levels/pull.rb
CHANGED
data/levels/pull_rebase.rb
CHANGED
data/levels/push.rb
CHANGED
data/levels/push_branch.rb
CHANGED
data/levels/push_tags.rb
CHANGED
data/levels/rebase.rb
CHANGED
data/levels/rebase_conflict.rb
CHANGED
data/levels/rebase_onto.rb
CHANGED
data/levels/remote.rb
CHANGED
data/levels/remote_add.rb
CHANGED
data/levels/remote_url.rb
CHANGED
data/levels/rename.rb
CHANGED
data/levels/rename_commit.rb
CHANGED
data/levels/reorder.rb
CHANGED
data/levels/repack.rb
CHANGED
data/levels/reset.rb
CHANGED
data/levels/reset_soft.rb
CHANGED
data/levels/restore.rb
CHANGED
data/levels/restructure.rb
CHANGED
data/levels/revert.rb
CHANGED
data/levels/rm.rb
CHANGED
data/levels/rm_cached.rb
CHANGED
data/levels/squash.rb
CHANGED
data/levels/stage_lines.rb
CHANGED
data/levels/stash.rb
CHANGED
data/levels/status.rb
CHANGED
data/levels/submodule.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
1
2
|
difficulty 2
|
2
3
|
description "You want to include the files from the following repo: `https://github.com/jackmaney/githug-include-me` into the folder `./githug-include-me`. Do this without manually cloning the repo or copying the files from the repo into this repo."
|
3
4
|
|
data/levels/tag.rb
CHANGED
data/levels/unstash.rb
CHANGED
data/lib/githug.rb
CHANGED
data/lib/githug/cli.rb
CHANGED
data/lib/githug/game.rb
CHANGED
data/lib/githug/level.rb
CHANGED
data/lib/githug/profile.rb
CHANGED
data/lib/githug/repository.rb
CHANGED
data/lib/githug/ui.rb
CHANGED
data/lib/githug/version.rb
CHANGED
data/spec/githug/cli_spec.rb
CHANGED
data/spec/githug/game_spec.rb
CHANGED
data/spec/githug/level_spec.rb
CHANGED
data/spec/githug/profile_spec.rb
CHANGED
data/spec/githug/ui_spec.rb
CHANGED
data/spec/githug_spec.rb
CHANGED
data/spec/spec_helper.rb
CHANGED