blob: 6434b2fff2b77821a668a9d2598dd709e5c1487a [file] [log] [blame]
Marian Harbachebeb1542019-12-13 10:42:46 +01001:linkattrs:
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08002= no new changes
Edwin Kempin497ac4a2010-12-28 12:55:22 +01003
4With this error message Gerrit rejects to push a commit if the pushed
Bruce Zucd6572d2014-01-21 11:11:42 +08005commit was already successfully pushed to Gerrit in project scope.
6In this case there is no new change and consequently there is nothing
7for Gerrit to do.
Edwin Kempin497ac4a2010-12-28 12:55:22 +01008
9If your push is failing with this error message, you normally
10don't have to do anything since the commit was already successfully
11pushed. Still this error message may sometimes come as a surprise if
12you expected a new commit to be pushed. In this case you should
13verify that:
Edwin Kempinddfc41a2011-05-06 10:32:05 +020014
15. your changes were successfully committed locally (otherwise there
16 is no new commit which can be pushed)
17. you are pushing the correct commit (e.g. if you are pushing HEAD
18 make sure you have locally checked out the correct branch)
Edwin Kempin497ac4a2010-12-28 12:55:22 +010019
20If you are sure you are pushing the correct commit and you are still
21getting the "no new changes" error unexpectedly you can take the
22commit ID and search for the corresponding change in Gerrit. To do
David Pursehousea1d633b2014-05-02 17:21:02 +090023this simply paste the commit ID in the Gerrit Web UI into the search
Edwin Kempin497ac4a2010-12-28 12:55:22 +010024field. Details about how to search in Gerrit are explained link:user-search.html[here].
25
Martin Fick022280f2020-06-02 14:57:03 -060026Please note that generally it only makes sense for each commit to
27be pushed only once. This means:
Edwin Kempinddfc41a2011-05-06 10:32:05 +020028
29. you cannot push a commit again even if the change for which the
30 commit was pushed before was abandoned (but you may restore the
31 abandoned change)
32. you cannot reset a change to an old patch set by pushing the old
33 commit for this change again
34. if a commit was pushed to one branch you cannot push this commit
Martin Fick022280f2020-06-02 14:57:03 -060035 to another branch in project scope (see link:user-upload.html#base[exception]).
Edwin Kempinddfc41a2011-05-06 10:32:05 +020036. if a commit was pushed directly to a branch (without going through
37 code review) you cannot push this commit once again for code
38 review (please note that in this case searching by the commit ID
Martin Fick022280f2020-06-02 14:57:03 -060039 in the Gerrit Web UI will not find any change), see
40 link:user-upload.html#base[exception].
Edwin Kempin497ac4a2010-12-28 12:55:22 +010041
42If you need to re-push a commit you may rewrite this commit by
Marco Miller82db49e2020-06-05 10:57:29 -040043link:http://www.kernel.org/pub/software/scm/git/docs/git-commit.html[amending,role=external,window=_blank]
Martin Fick022280f2020-06-02 14:57:03 -060044it or doing an interactive
Marco Miller82db49e2020-06-05 10:57:29 -040045link:http://www.kernel.org/pub/software/scm/git/docs/git-rebase.html[git rebase,role=external,window=_blank],
46or see link:user-upload.html#base[exception,role=external,window=_blank].
47By rewriting the commit you actually create a new commit
48(with a new commit ID in project scope) which can then be pushed to Gerrit.
David Pursehouse905cb4e2018-01-26 08:49:52 +090049
50If you are pushing the new change to the same destination branch as
51the old commit (case 1 above), you also need to replace it with a new
52Change-Id, otherwise the push will fail with another error message.
Edwin Kempin497ac4a2010-12-28 12:55:22 +010053
Martin Fick022280f2020-06-02 14:57:03 -060054Sometimes a change no longer makes sense to be destined for a specific
55branch, and instead of trying to re-push the commit for a different
56branch, it makes more sense to move the change to the preferred branch
57(where it will now likely need a rebase). Moving the change instead of
58pushing a rebased commit to the preferred branch helps to retain code
59review comments and any previous patchsets on the original change.
60
Kenny Ho5c309a82015-10-02 10:45:02 -040061== Fast-forward merges
62
63You will also encounter this error if you did a Fast-forward merge
64and try to push the result. A workaround is to use the
65link:user-upload.html#base[Selecting Merge Base]
66feature or enable the
67link:project-configuration.html#_use_target_branch_when_determining_new_changes_to_open[
68Use target branch when determining new changes to open]
69configuration.
Edwin Kempin497ac4a2010-12-28 12:55:22 +010070
71GERRIT
72------
73Part of link:error-messages.html[Gerrit Error Messages]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070074
75SEARCHBOX
76---------