0

I Made a commit to gerrit .There was a couple of files with no changes apart from white space. Using eclipse I replaced the current version of the file(one with extra unwanted whitespaces ) with the previous version(a version authored by someone else with no extra whitespaces).I then made a few more changes to the code based on comments. So now I'm at the stage where I'm ready to commit again and upload a new patchset for review. However the files I replaced with the previous version are showing up in the staging area a changed files. Is this correct behaviour ? I am a new user of git / gerrit but this seems odd.

1 Answers1

1

Yes, this is correct. They're showing in the staging area as changed files compared to the version with the whitespaces. When you commit the changes (don't forget to use "git commit --amend", this is very important) and execute a "git diff" against the previous commit (the one you have based your change) these files won't show anymore.