This repository has been archived by the owner on Jun 8, 2019. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove all git remotes before and after scenarios.
- Loading branch information
Gabe Berke-Williams
committed
Oct 21, 2011
1 parent
4a72bc0
commit 7e4eab3
Showing
2 changed files
with
17 additions
and
2 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,8 @@ | ||
module GitRemoteHelpers | ||
def remove_all_git_remotes | ||
remotes = `git remote -v show | grep fetch | cut -f1`.strip.split | ||
remotes.each { |remote| `git remote rm #{remote} 2> /dev/null` } | ||
end | ||
end | ||
|
||
World(GitRemoteHelpers) |