[git-users] Re: How can I know which line was changed in git ?
On Tuesday, February 7, 2012 11:21:57 AM UTC+5:30, paymaster wrote: Hi I'm making some kind of testing tool. This tool needs what line changed information in file. But I could not found that information by git command. There's no single command that'd give you that information. But here's how you can get close: Assume COMMIT is the commit that you want to know more about. git show --name-status COMMIT will show you the list of files that's part of the commit (modified, added or deleted etc.). If FILE is modified in COMMIT, you could do git blame COMMIT -- FILE and grep for COMMIT in the output which will give you the list of lines in which the file was changed. In summary: git show --abbrev-commit --diff-filter=M --name-only --pretty=oneline COMMIT | sed -n '2,$p' # Gives the list of modified files git blame COMMIT -- FILE | grep COMMIT # List of lines modified See git help blame for additional options. HTH. -- Jeenu -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/p7K-NYyNUXkJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: How can I know which line was changed in git ?
thanks for answer :-) but I want to know first.. How can I know linenumbers had changes?? On 2월7일, 오후4시07분, Thomas Ferris Nicolaisen tfn...@gmail.com wrote: Do you need to know which linenumbers had changes? Or just see the changes? I'm not sure about the first one, but the second one you can achieve with: git show 164c813020f091ce4b7f71bb7d9170585d3336b6 -- You received this message because you are subscribed to the Google Groups Git for human beings group. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: How can I know which line was changed in git ?
I don't think that this task belongs to git ... Maybe you should look at diff or similar tools. -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/68dK6vq9eMsJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.
[git-users] Re: How can I know which line was changed in git ?
Do you need to know which linenumbers had changes? Or just see the changes? I'm not sure about the first one, but the second one you can achieve with: git show 164c813020f091ce4b7f71bb7d9170585d3336b6 -- You received this message because you are subscribed to the Google Groups Git for human beings group. To view this discussion on the web visit https://groups.google.com/d/msg/git-users/-/eYM7aYV7hXYJ. To post to this group, send email to git-users@googlegroups.com. To unsubscribe from this group, send email to git-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/git-users?hl=en.