Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8311615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T19:52:30+00:00 2026-06-08T19:52:30+00:00

Consider the highlighted commits in the following : For the current discussion I’ll refer

  • 0

Consider the highlighted commits in the following :

GITK

For the current discussion I’ll refer to the commits as follows :
Commit 1 : Read Language settings from the User Settings
Commit 2 : [POC] Do not review

We use Gerrit for code review. Both Commit 1 and Commit 2 are under review and have not been merged. I am working on Commit 1 which required code in Commit 2 and hence had to be based off it. These are the commands I used :

  1. Cherry Pick Commit 2. I use the cherry-pick command that get from Gerrit for that change:
    Cherry-pick Commit 2

  2. Make the changes that were needed for my work and push a change which became Commit 1. When I first pushed Commit 1, it was based on patchset 8 of Commit 2.

As and when I get review comments on my commit (Commit 1), I push new patch sets for it on Gerrit. However, when it is to be merged finally, it needs to be on the latest patchset of it’s parent (Commit 2). The way I do it now is as follows :

  1. git checkout working2
  2. git reset –hard remotes/origin/head
  3. Cherry-pick Commit 2 —> This gets me the latest version of Commit 2
  4. Cherry-pick Commit 1
  5. git push origin working2:refs/for/head

Is there a way in which I can just get the latest patchset of Commit 2 without doing all of the above ? Perhaps some kind of interactive cherry pick or rebase ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T19:52:31+00:00Added an answer on June 8, 2026 at 7:52 pm

    You can simply rebase Commit 1 to the FETCH_HEAD. While on working2 branch,

    $ git fetch ssh://user@gerrit.dev.xyz.net:29418/management-console refs/changes/26/11926/11 
    $ git rebase -i FETCH_HEAD
    

    Remove the line with the commit message of Commit 2 (first line usually). Now Commit 1 will be on top of the latest Commit 2. If you’re unfamiliar with interactive rebase, take a look here.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Consider my html as follows: <ul id=menu> <a href=home.html><li class=highlighted id=first_item>Home</li></a> <a href=join.html><li class=non_selected_tabs>Join</li></a>
consider the following: http://jsfiddle.net/MgZ7n/10/ I want the entire hd to be highlighted in blue.
Consider having the following header file (c++): myclass.hpp #ifndef MYCLASSHPP_ #define MYCLASSHPP_ namespace A
Consider the following C#: // C# .net switch(x) { case 1: for(int i =
Consider the following URL: http://www.iamsomeweiredurl.fromsomewhere/andIwant#thisfragment Is there a chance to get thisfragment by @RequestMapping
Consider the following code: template <class x1, class x2 = int*> struct CoreTemplate {
Consider the following Mechanize form object #<Mechanize::Form {name f1} {method POST} {action f.php} {fields
Consider the following code: public interface A { public A another(); } public interface
Consider the following record: TMyRecord = record b: Boolean; // 3 bytes of padding
Consider the following snippet of code: foreach (var setting in RequiredSettings) { try {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.