Module: StashCLI::GitUtils
- Defined in:
- lib/stash_cli/git_utils.rb
Class Method Summary collapse
Class Method Details
.commits_from_branch(source_branch) ⇒ Object
7 8 9 10 |
# File 'lib/stash_cli/git_utils.rb', line 7 def self.commits_from_branch(source_branch) current_branch = GitUtils.current_branch `git log --oneline #{source_branch}..#{current_branch} | cat`.strip end |
.current_branch ⇒ Object
3 4 5 |
# File 'lib/stash_cli/git_utils.rb', line 3 def self.current_branch `git rev-parse --abbrev-ref HEAD`.strip end |