http://stackoverflow.com/questions/610208/how-to-retrieve-a-single-file-from-specific-revision-in-git
How to compare to revisions of a file?
git diff revision_1 revision_2 file
How to find a text snippet in any revision of a file? (i.e. grepping the histroy tree of the file)
git log --oneline -S'text snippet'
(--online is opitional, to make it easier to read if there are many hits)
How to compare a local file with one in a remote repo? http://stackoverflow.com/questions/5162800/git-diff-between-cloned-and-original-remote-repository
1) Update your local copy of a remote:
git fetch foobar Fetch won't merge with your working copy (as opposed to pull). This gives you a local copy, which you can compare against with diff. If you have not set this remote up yet, do so with
git remote add foobar git://github.com/user/foobar.git
2) Compare any branch from your local repository or your working copy:
git diff master foobar/master
How to list all lines changed by a given author?
http://stackoverflow.com/questions/1265040/how-to-count-total-lines-changed-by-a-specific-author-in-a-git-repository
git log --oneline -p --author='Nirmal M G' | wc -l
can use -C option to ignore file renames as lots of add/removes.
No comments:
Post a Comment