Skip to content

Instantly share code, notes, and snippets.

View petersenna's full-sized avatar
🚀

Peter Senna Tschudin petersenna

🚀
View GitHub Profile
@petersenna
petersenna / LinesAgeBeforeCommit
Last active August 29, 2015 14:01
Getting the age of the (last) lines your commits are touching
What is the age of the lines my patches are touching?
Apply all your patches in a local branch of linux-next, but be aware that some commands
are executed on remotes/linux-next/master while other on the branch with the changes.
1 - Get git diff. -U0 is very important here
#### On the branch with the changes ####
$ git diff -U0 remotes/linux-next/master > /tmp/1.patch
2 - Get rid of useless lines