forked from reenhanced/gitreflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Issue reenhanced#66 + reenhanced#74] Implementing "Git Reflow Refresh"
- Loading branch information
1 parent
74a9d4a
commit 9984f90
Showing
5 changed files
with
80 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
desc 'Updates and synchronizes your base branch and feature branch.' | ||
long_desc <<LONGTIME | ||
Performs the following:\n | ||
\t$ git checkout <base_branch>\n | ||
\t$ git pull <remote_location> <base_branch>\n | ||
\t$ git checkout <current_branch>\n | ||
\t$ git pull <remote_location> <current_branch>\n | ||
\t$ git merge <base_branch>\n | ||
LONGTIME | ||
arg_name '[remote_location] - remote repository name to fetch updates from (origin by default), [base_branch] - branch that you want to merge with (master by default)' | ||
command :refresh do |c| | ||
c.desc 'updates base_branch based on remote and merges the base with your feature_branch' | ||
c.arg_name '[remote_location] - remote repository name to fetch updates from (origin by default), | ||
[base_branch] - branch that you want to merge with (master by default)' | ||
c.flag [:r,:remote], default_value: 'origin' | ||
c.flag [:b,:branch], default_value: 'master' | ||
c.action do |global_options, options, args| | ||
# usage: git reflow refresh [remote_location - defaults to origin] [base_branch_name - defaults to master] | ||
# defaults remote_location to origin | ||
refresh_options = { | ||
:remote => options[:remote] || 'origin', | ||
:branch => options[:branch] || 'master', | ||
} | ||
|
||
GitReflow.update_feature_branch(refresh_options) | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters