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 8696193
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T01:13:20+00:00 2026-06-13T01:13:20+00:00

I was trying to push a new patch set to an existing change under

  • 0

I was trying to push a new patch set to an existing change under review in Gerrit with:

git push origin HEAD:refs/for/foo

but it failed with an error that the change was already closed. Then, I foolishly tried:

git push . HEAD:refs/for/foo

which seemed successful, but when I checked Gerrit, there was no new patch set. I think part of the reason was that my commit comment did not contain the Gerrit change ID that I wanted to push to. But what did the last command actually do? And how can I undo it?

  • 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-13T01:13:21+00:00Added an answer on June 13, 2026 at 1:13 am

    The “.” argument means “push to this repository”, and the refspec HEAD:refs/for/foo means “take the current commit that HEAD is pointing to, and make a new ref (similar to a branch, although those are usually stored as refs/heads/something) named refs/for/foo that points to the same commit”.

    Essentially, it’s creating a new “branch” at the current commit, but since the desired name isn’t in the normal branch name-space, we can’t just use git branch refs/for/foo.

    You should be able to undo it with git push . :refs/for/foo – naming an empty source to replace the ref with.

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

Sidebar

Related Questions

Ive been trying to push a new view when a cell is tapped but
First of all, im new to Git and Git hooks. Here's what im trying
I am new to Git and I'm trying to get a subfolder uploaded into
I'm trying to use hg push to a git repository, but it silently fails.
I'm trying to push a new view on my navigation controller using: -(IBAction)switchPage:(id)sender {
Im trying push some data into a CRM system via an XML import. I
I am getting this error when I am trying push my files into heroku
I'm trying to push a Flask application into Heroku. But if i start the
I'm trying to push a Lua class object onto the stack. The pointer to
I'm trying to push a view controller like so: SampleViewControllerB *svcb = [self.storyboard instantiateViewControllerWithIdentifier:@viewB];

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.