Questions tagged [gerrit]

Gerrit is a web based code review and project management for Git based projects.

Gerrit is a web based code review system, facilitating online code reviews for projects using the Git version control system.

Gerrit makes reviews easier by showing changes in a side-by-side display, and allowing inline comments to be added by any reviewer.

Gerrit is not only a review interface but it's able to manage git repository into is core. To keep an external git repository, it is recommended to use replication plugin. Replication plugin documentation.

Gerrit2 is a complete rewrite of the Gerrit fork, completely changing the implementation from Python on Google App Engine, to Java on a J2EE servlet container and a SQL database.

1894 questions
156
votes
2 answers

Why is git push gerrit HEAD:refs/for/master used instead of git push origin master

I've just started using gerrit and I want to know why we need to do git push gerrit HEAD:refs/for/master instead of doing git push origin master If I do git push origin master I get the error saying ! [remote rejected] master -> master (prohibited…
Shrayas
  • 6,040
  • 11
  • 34
  • 54
78
votes
4 answers

How to git-pull a given patch set from Gerrit?

When working with Gerrit (Code Review), I often need to get a copy of a given patch set for testing or validation purpose. The obvious and easiest way is to download the archive or the patch file through the Gerrit Web interface and manually apply…
Herve Thu
  • 1,037
  • 1
  • 11
  • 10
72
votes
5 answers

Not able to add comments on Gerrit. It rather gets added as Draft. What am I doing wrong?

Not able to add comments on Gerrit. It rather gets added as Draft. What am I doing wrong? Others in my team are able to add comments though.
Gunanaresh
  • 889
  • 1
  • 8
  • 20
60
votes
10 answers

git unpack error on push to gerrit

On push of a new branch to a gerrit server we encounter the following error: de@roma:~/git-hate/www$ git push origin landingpage Counting objects: 149, done. Delta compression using up to 2 threads. Compressing objects: 100% (73/73), done. Writing…
edlerd
  • 2,042
  • 1
  • 15
  • 22
53
votes
12 answers

Gerrit error when Change-Id in commit messages are missing

I set up a branch in the remote repository and made some commits on that branch. Now I want to merge the remote branch to the remote master. Basically follows are my operations: checkout branch checkout master merge branch and fix merging…
Pan Ruochen
  • 1,656
  • 5
  • 19
  • 29
53
votes
3 answers

gerrit - git (pull vs checkout vs cherrypick) which is for what?

In Android's gerrit ex: link, to download the patch, I see 4 options. repo download checkout pull cherry-pick What is the difference between them? Here is what I think of them. Please clarify repo download --> Downloads full source code(of all…
mk..
  • 15,357
  • 13
  • 60
  • 96
48
votes
17 answers

Git push remote rejected {change ### closed}

i am having problems pushing my changes from my local master to remote master because of this error: remote: Processing changes: refs: 1, done To ssh://xxxxx@gerrit.dev.xxxxx.net:29418/xxxxxx ! [remote rejected] HEAD -> refs/for/master (change…
Jonathan
  • 15,559
  • 47
  • 120
  • 204
47
votes
3 answers

Are pull requests part of Git, or a feature of tools like GitHub, Gerrit and Atlassian Stash?

Pull requests seem to be the common way to do code review with Git. However, it is not clear whether this term means the same when using the built-in git request-pull, or a different tool. Are pull requests an intrinsic function of Git, or is it a…
user3049984
  • 581
  • 4
  • 4
43
votes
3 answers

Gerrit: combine multiple commits into one "change"

As a git best practice, one should commit frequently, but to review the code you may need to review a patch consisting of multiple commits at once. Is there a way multiple commits can be reviewed and either merged or rejected at once?
Nonos
  • 2,327
  • 2
  • 20
  • 33
43
votes
4 answers

why is git-cherrypick saying nothing to commit

I googled a lot for the below issue but couldn't get any substantial info...please help me out,created a temporary branch 202116 and am trying to do a cherrypick of gerrit 202116 and I get the below message,why am I not able to cherry-pick this…
user1934146
  • 2,239
  • 7
  • 21
  • 24
38
votes
9 answers

Git / gerrit, push remote rejected no changes made

Made changes to a commit, performed commit amend. Do a push and I get the error: ! [remote rejected] master -> refs/for/master (no changes made) Checked the change ID in the commit message and its still a valid commit. I've tried changing a file,…
edwardmlyte
  • 13,220
  • 21
  • 55
  • 81
38
votes
3 answers

How to merge the Gerrit branch to another Gerrit branch

I'm using Gerrit version 2.4.2. I have a branch master and I created a new branch, called newbranch. Then I pushed some changes to the remote (Gerrit's) newbranch. After verifying in Gerrit, I merged the changes to newbranch. No, I want to merge…
Alan Shen
  • 381
  • 1
  • 3
  • 4
35
votes
2 answers

Gerrit with Github

I am using github and I am willing to start using Gerrit with it. Since Gerrit uses JGit, I am scared of the following text from this link: EGit/JGit is a reimplementation of git in java, due to this GitHub does not officially support it.…
Macarse
  • 87,001
  • 42
  • 169
  • 229
35
votes
2 answers

Revert to older patch set version via the Gerrit UI?

If I have multiple patch set versions for one change in Gerrit, it seems like I can only submit the latest patch set version (because only that one has the necessary button). Is there an easy way to instead submit one of the old patch set versions…
Bananeweizen
  • 20,962
  • 8
  • 64
  • 86
34
votes
14 answers

How can I recover my Git repository for a "missing tree" error?

We are using Gerrit for our Git repository. On a project that has been active for several months, we are suddenly unable to push any changes. When we execute git push we see the following error: error: unpack failed: error Missing tree…
Justin Guertin
  • 453
  • 1
  • 4
  • 7
1
2 3
99 100