Module: Stool::Git_util
Instance Method Summary collapse
- #git_checkout(file) ⇒ Object
-
#git_commit_all(msg) ⇒ Object
提交.
-
#git_st ⇒ Object
状态.
- #git_stash ⇒ Object
- #git_stash_pop ⇒ Object
-
#git_up ⇒ Object
update.
Instance Method Details
#git_checkout(file) ⇒ Object
43 44 45 |
# File 'lib/stool/Core/Git.rb', line 43 def git_checkout(file) `git checkout #{file}` end |
#git_commit_all(msg) ⇒ Object
提交
23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/stool/Core/Git.rb', line 23 def git_commit_all(msg) `git diff` puts "--- 提交所有变更代码" `git add .` unless msg msg = 'stool - auto commit' end `git commit -m"#{msg}"` end |
#git_st ⇒ Object
状态
7 8 9 10 |
# File 'lib/stool/Core/Git.rb', line 7 def git_st puts "--- git status" `git status` end |
#git_stash ⇒ Object
12 13 14 15 |
# File 'lib/stool/Core/Git.rb', line 12 def git_stash puts "--- git stash" `git stash` end |
#git_stash_pop ⇒ Object
17 18 19 20 |
# File 'lib/stool/Core/Git.rb', line 17 def git_stash_pop puts '--- git stash pop' `git stash pop` end |
#git_up ⇒ Object
update
38 39 40 41 |
# File 'lib/stool/Core/Git.rb', line 38 def git_up puts "--- git update" `git pull` end |