On Thu, 18 Sep 2014 07:45:38 -0700 (PDT)
Kumar <bitraki...@gmail.com> wrote:

> New to git, I've a branch from which I need to revert some 40 hashs.
> These 40 sha ids are not in the right order to revert.
> 
> Example A - B - C - .... - Z.
> 
> I've got C, F, Z , Y to revert.  I need to have the recent id first,
> like Z, Y, F, C so that the revert is correct and smooth.  
> 
> I've checked rev-list but that dint work, it picks up all the ids
> between 2 hash ids when tried with 2 ids.  Not sure how this works.

I think you've picked the right command, just had a wrong idea
about how it works by default.

`git rev-list` is the workhorse which performs actual crawling
of the history's DAG when asked to do this by tools like `git log`.
These tools most of the time want more than one commit traversed:
people usually want ranges (or sets) of commits to be examined.
So by default this tools "walks" all the history DAG using the
commits you've passed to it as "roots" or "anchors".

> Any help how can I re-order ? git command or a new shell script ?  

You want to stop it from walking the tree, so try

  git rev-list --no-walk C F Z Y

-- 
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 git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to