Relationship between git commits and review items in Gerrit

When I git commit to my local branch, I like to commit one file at a time so that I can put in a commit message dedicated to that file only. I just got done working on a task and I changed 8 files total, each of which was its own commit with its own commit message.

When I pushed my local branch into Gerrit, that created 8 code review items, not what I wanted. I wanted a single review item with the 8 file changes bundled together.

Q1: Does one git commit mean one Gerrit review item?

Q2: How do I undo my push into Gerrit?

Q3: How do I make it work so that I have individual file commits and commit messages but a single review item when it is pushed into Gerrit?

  • include directory of git repository into own with full functionality
  • Git Subtree Merging reports conflict when merging a simple upstream change
  • Show the full command when executing a Git alias?
  • Git clone fail over https whith a gitlab behind a certificate protected apache
  • Git project is not recognized by xcode
  • Using Tags vs. Cleaning Commits
  • Where can I report a git bug
  • What are BASE, LOCAL, REMOTE and cppMerged files?
  • One Solution collect form web for “Relationship between git commits and review items in Gerrit”

    A1: Yes, a Gerrit review item is created for each commit that you push.

    A2: To undo your push into Gerrit, use the “Abandon” button in Gerrit for each of your review items.

    A3: You will need to squash your multiple commits into one commit before pushing to Gerrit. Use git rebase -i to rewrite your commits into one, then push to Gerrit.

    Git Baby is a git and github fan, let's start git clone.