gerrit

git提交代码到gerrit失败

╄→гoц情女王★ 提交于 2019-12-18 20:44:06
git提交代码到gerrit失败 一、前言 tips:如果我们想在gerrit上管理代码。那么你的每次提交都要带上一个commit_id,这样才能保证你能push到远端的rfes/for/master上。(注意是这个Change_id) 要每次提交代码的时候都带上一个这样的唯一标识: 怎么生成唯一标识可自行查找 二、背景: 提交代码的正确姿势: 1:提交代码 git add . git commit --amend (注意这里一定是amend,因为要保证每次的patchset是同一次提交) 2:拉取远端最新的变化 git fetch --all 3:rebase主干分支(master)的代码变化 git rebase origin/master -i 4:提交代码到主干分支 git push origin HEAD:refs/for/master 错误复现: 提交代码没有问题,在拉取远端最新的分支变化的时候我执行的是 git catch (起的git命令别名。这里我以为执行的是 git fetch --all 其实是 git remote update origin --prune )前者是拉取远程分支的变动,后者是更新分支的变动。所以实际上并没有更新远程分支的代码。这时候我push到远程分支被拒绝。所以我就reset到master的上一次提交,然后再add, commit -

Gerrit googleplay publisher plugin credentials has not been configured correctly

跟風遠走 提交于 2019-12-18 13:29:30
问题 I use gerrit with Google Play Android Publisher Plugin the way it described in plugin tutorial on the plugin page. .apk is signed and if I upload it via google play gui it uploads well. When I try to upload it using gerrit i get en error. Log below: Upload failed: The Google Service Account credential 'GooglePlayAPICredentials' has not been configured correctly. Update the credential, ensuring that the required data have been entered, then try again - No changes have been applied to the

Getting local gerrit and repository working (including branches) based on a github project

廉价感情. 提交于 2019-12-18 13:18:24
问题 Our goal is to do internal development based on a project hosted on an external repo (github) using git and gerrit. We would pull from the external repo periodically to bring in new changes and branches, and use gerrit to manage the review process (and Jenkins to build it all). Our initial process is to clone from the external repo to a local repo via git, then create an empty project in gerrit, and finally push the local clone to gerrit. At that point, however, we see no branches in the

Gerrit Add Reviewers

懵懂的女人 提交于 2019-12-18 12:17:00
问题 I have a project in Gerrit and each time I submit a change I manually have to add a group of reviewers to that change. Is there a mechanism that would allow me to specify reviewers that I want to be emailed for each change? 回答1: You can use the %r=reviewer@mail.com syntax on your branch specifier during a push to automatically add reviewers to a change. You can add as many emails as you want and all will be emailed, e.g. git push tr:kernel/common HEAD:refs/for/experimental%r=a@a.com,r=b@b.com

Git / gerrit, push remote rejected no changes made

試著忘記壹切 提交于 2019-12-18 10:10:46
问题 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, checking it shows up as an alteration and then added to staging area and done another commit amend. Try the push again and getting the same issue. No idea on this one. Edit: This is pushing to gerrit, not git directly. I'm running: git push origin

How to review a specific commit on Git

你。 提交于 2019-12-17 19:24:33
问题 I sent a commit (named "A commit") to review (Gerrit) using git review command. Now, I make a new commit (named "B commit") and I want to send it to review as well, but I don't want to re-send the "A commit". There is no dependencies each other. How to send a review to gerrit for a specific commit?. UPDATE : $ git add --all $ git status # On branch delete_role # Changes to be committed: # (use "git reset HEAD <file>..." to unstage) # # modified: path/to/file.ext $ git status # On branch

git unpack error on push to gerrit

筅森魡賤 提交于 2019-12-17 17:26:02
问题 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 objects: 100% (111/111), 2.77 MiB, done. Total 111 (delta 68), reused 80 (delta 38) remote: Resolving deltas: 100% (68/68) error: unpack failed: error Missing tree 30c4809ade0b4b0c81cb7f882450774862b82361 fatal: Unpack error, check server log To ssh

git alias for HEAD:refs/for/master

拥有回忆 提交于 2019-12-17 10:17:27
问题 I am configuring Gerrit and I would like to avoid writing: git push gerrit HEAD:refs/for/master I would like to write: git push review I am sure it's possible modifying .git/config but I can't make it work. 回答1: I set up two different push types, review and noreview: for reviews: git config remote.review.pushurl ssh://<GERRIT_HOST>:29418/<PROJECT_PATH>.git git config remote.review.push refs/heads/*:refs/for/* git push review # this will push your current branch up for review to bypass review:

Gerrit error when Change-Id in commit messages are missing

家住魔仙堡 提交于 2019-12-17 07:10:19
问题 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 errors commit push origin HEAD:refs/for/master But get error messages on the 5th step: remote: Resolving deltas: 0% (0/12) remote: ERROR: missing Change-Id in commit message ... remote: Change-Id: I55862204ef71f69bc88c79fe2259f7cb8365699a To ssh://prc@test

Gerrit error when Change-Id in commit messages are missing

故事扮演 提交于 2019-12-17 07:09:11
问题 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 errors commit push origin HEAD:refs/for/master But get error messages on the 5th step: remote: Resolving deltas: 0% (0/12) remote: ERROR: missing Change-Id in commit message ... remote: Change-Id: I55862204ef71f69bc88c79fe2259f7cb8365699a To ssh://prc@test