Created
October 13, 2011 14:39
-
-
Save dwaynemac/1284367 to your computer and use it in GitHub Desktop.
Shell scripts to manage multiple projects with git
This file contains hidden or 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
.idea/ |
This file contains hidden or 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
#!/usr/bin/env ruby | |
Dir['*/'].each do |dir| | |
puts "fetching #{dir.gsub("/","")} origin" | |
puts `cd #{dir} && git fetch origin` | |
end |
This file contains hidden or 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
#!/usr/bin/env ruby | |
Dir['*/'].each do |dir| | |
output = `cd #{dir} && git status` | |
if output =~ /nothing to commit/ | |
puts "#{dir.gsub("/","")}: clean" | |
else | |
puts "==> #{dir.gsub("/","")}: DIRTY!" | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment