Thread (23 messages) flat view 23 messages, 10 authors, 2016-06-15

Re: Creating something like increasing revision numbers

From: Nicolas Pitre <nico@fluxnic.net>
Date: 2016-06-15 22:47:34

On Mon, 19 Oct 2009, Norbert Preining wrote:
Now my follow-up questions:
- how would one access this "sequence" number on the server
you can count how many commits the server has: git rev-list HEAD | wc -l
- is there a way to determine at which of this "sequence" numbers a specific
  file has been changed last?
You can do: git log <path/filename>.  That would give you a list of 
commits that touched that file.  But to find out which commit "number" 
it is you could do:

	git rev-list $(git rev-list -1 HEAD <path/file>) | wc -l

Again, that is true for a particular repository only and may give a 
different result in another repository with a different state even for 
the same commit.

However, given what you want to do is really to stick to the SVN way of 
doing things, then why don't you simply stay with SVN?  Git works in a 
fundamentally different way than SVN, and if you aren't willing/able to 
change your workflow away from the SVN way then there is really not much 
for you to gain by switching to Git.


Nicolas
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help