Created
March 4, 2011 18:35
-
-
Save kidpollo/855456 to your computer and use it in GitHub Desktop.
Useful git commands
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
#make a new branch that tracks remote branche | |
git branch --set-upstream foo upstream/foo | |
#list the files modified on the last 10 commits and filter only spec files | |
git diff --name-only HEAD~10 | egrep _spec\.rb | |
#difference between the state of the file from 3 commits in the past | |
git diff HEAD~3 -- app/views/topics/merges/_new.html.haml | |
#run specs modified on the last 10 commits | |
spec `git diff --name-only HEAD~10 | egrep _spec\.rb` | |
#prune repos that where removed on remote | |
git remote prune origin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment