thanks for sharing details Konstantin  , this helps , I shall try now and 
let you know :-) 


On Wednesday, January 10, 2018 at 9:14:13 PM UTC+5:30, Konstantin Khomoutov 
wrote:

> On Wed, Jan 10, 2018 at 07:25:12PM +0530, Yogi Nerkar wrote: 
>
> > Repositories accessed  remotely using SSH or HTTPS  ,so I need to close 
> it 
> > for git log. 
>
> Clone, not close; otherwise correct. 
>
> > Regarding diff , I would like to see lines of code changes happened from 
> > last 2 months with user and date 
>
> First, I invite you to re-read what I originally wrote on this: 
>
> [...] 
>
> >> Say, you run `git log` to determine the set of all commits a particular 
> >> developer made since the specified timeframe. If yes, then *what* would 
> >> you like the diffs to be generated for? Note that the commits in that 
> >> set might represent completely unrelated changes, be done on separate 
> >> branches etc. 
>
> If you understand this, and really want to see diffs (patches) inroduced 
> by each individual commit made by a particular user in the speficied 
> timeframe, then all you need is the "--patch" command line option to 
> `git log`. 
>
> OK, now let's move on to `git log`. This is a high-level command which 
> calls lower-level stuff to carry out its task. The major two commands it 
> leverages are `git rev-list`, which lists in the reverse chronological 
> order the matching some user-specified criteria, and `git diff` which 
> produces the differences between two linked (parent/child) commits. 
>
> To limit the set of commits found, you have the following criteria which 
> must all hold simultaneously for a commit to be included in the 
> resulting set: 
> - It has a particular author; 
> - It was created no later than the specified moment in time; 
> - It is reachable from any existing reference (a branch or a tag). 
> The command-line options of `git rev-list` to consider for specifying 
> these criteria are: "--author", "--since" and "--all". 
> Please consult that command's manual page to gain full understanding 
> (run `git help rev-list`). 
>
> The ways a date for the "--since" option can be specified is explained 
> in the "gitrevisions" manual page (run `git help revisions` to view it). 
> Basically, you can use --since="2 month ago" and the like. 
>
> So, the complete command would look like this: 
>
>   $ git log --all --since="2 month ago" --author=johndoe --patch 
>
> It will: 
>
> - Select all references (branches, including remote, and tags) to start 
>   traversing the history graph from. 
> - Limit this traversal to the commits created no earlier than two month 
>   ago. 
> - Select only the commits made by a person whose name or e-mail address 
>   contain the substring "johndoe". 
> - Generate the textual difference introduced by each commit and display 
>   it along with the commit's metadata. 
>
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to