Skip to content

Instantly share code, notes, and snippets.

View emoreth's full-sized avatar

Everton Moreth emoreth

  • Rio de Janeiro, Brasil
View GitHub Profile
@emoreth
emoreth / add_forks
Created March 30, 2014 05:33
Add all forks as remote from GItHub
require "rubygems"
require "open-uri"
require "json"
# Run this script on the current git folder, changing repo name and user
forks = JSON.parse(open("https://api.github.com/repos/REPO_USER/REPO_NAME/forks").readlines.join(''))
forks.collect { |f| [f['owner']['login'], f['git_url']] }.each do |name, url|
puts "Adding #{name}"
`git remote add #{name} #{url}`
@emoreth
emoreth / gist:843892
Created February 25, 2011 14:57
Git aliases
# git
alias gl='git pull'
alias gp='git push'
alias gd='git diff'
alias gc='git commit'
alias ga='git add .'
alias gca='git commit -a'
alias gco='git checkout'
alias gb='git branch'
alias gs='git status'