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 150f8f7
Showing
4 changed files
with
72 additions
and
12 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,21 @@ | ||
desc 'refresh will merge your current branch based on the base 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 origin <current_branch>\n | ||
\t$ git push origin <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.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 | ||
remote_location = args.length < 2 ? "origin" : args[1] | ||
base_branch = args.length < 1 ? "master" : args[0] | ||
|
||
GitReflow.update_feature_branch({base_branch: base_branch, remote: remote_location}) | ||
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