we are using Git and Gerrit stack; since Gerrit is good about keeping track 
of an individual commits(changes), when a commit breaks CI, Gerrit a) 
prevents the change to be merged into master b)provides a patch branch a 
developer can checkout and amend the broken commit.

I got into the situation when I made a change "A" that broke that build, so 
gerrit never merged the change into a master. I then checked out a patch 
with my change in it on top of history and reverted my change "A" to look 
like it looked before (and equivalent to a current master). "git status" 
tells me that I do have a modified file in my branch. But "git commit" 
tells me that my commit is empty.

Is this because the SHA1 of the fixed file on my branch and SHA1 of the 
same file on the master are identical? To fix the situation I just add an 
empty line to a reverted file, to make it look a little different from 
master, and then git does not complain about an empty commit. What is the 
right practice in a situation like this?

Thank you.

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/groups/opt_out.

Reply via email to