Skip to content

Instantly share code, notes, and snippets.

View douglas's full-sized avatar

Douglas Soares de Andrade douglas

View GitHub Profile
@douglas
douglas / gist:1072791
Created July 8, 2011 20:52
Remove an unwanted commit on git and github
# force git/github to ignore a unwanted commit and use HEAD^ as HEAD of the repository
$ git push -f origin HEAD^:remote_branch
OR
$ git rebase -i HEAD~2
$ git push origin +master
References:
@douglas
douglas / gist:1066406
Created July 6, 2011 02:27
Install swig on a ubuntu box
sudo apt-get install swig
@douglas
douglas / gist:1066392
Created July 6, 2011 02:19
Install swig on a archlinux box
sudo pacman -S swig
@douglas
douglas / gist:1066385
Created July 6, 2011 02:10
Changing git repository without needing to delete and clone the repository
# first see the current origin
git remote -v
# now we delete the origin
git remote rm origin
# now we set the new origin
git remote add origin git@github.com:user/reponame.git
# optional: make git pull and push from someremote (on our case, origin)
@douglas
douglas / install_swig_mac.sh
Created July 6, 2011 01:47
Install swig on a mac with homebrew
brew install https://raw.github.com/cobrateam/formulae/master/swig.rb