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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:09:31+00:00 2026-05-19T04:09:31+00:00

I accidentally created a branch called remotes/origin/remotes/origin/aclark and can’t delete it with: git branch

  • 0

I accidentally created a branch called “remotes/origin/remotes/origin/aclark” and can’t delete it with:

git branch -d remotes/origin/remotes/origin/aclark

Git says:

error: branch ‘remotes/origin/remotes/origin/aclark’ not found.

I tried some of the suggestions here: Deleting a badly named git branch, but they are geared more towards bad branch names that start with “–“.

Is there any way an end user can delete this branch or do I need a git admin? (The branch in question lives at gitorious).

Thanks

Alex

  • 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-05-19T04:09:32+00:00Added an answer on May 19, 2026 at 4:09 am

    This is a remote branch, so you need to delete it on the server. To do that, you need to push an empty reference.

    $ git push origin :remotes/origin/aclark
    

    Note, the syntax of the git push command is:

    $ git push <remote> <local-reference>:<remote-branch-name>
    

    So in the case, we are pushing an empty reference, and the remote name is the name of the branch we want to destroy. In your case, the branch name “remotes/origin/remotes/origin/aclark” indicates that it is a remote branch on the remote server name “origin”, and the name on the distant server is “remotes/origin/aclark”.

    The other client will need to issue the following commands to have the branch removed from their local repository (if they fetched when the invalid branch existed):

    $ git fetch origin
    $ git remote prune origin
    

    More information can be found in the git-push and git-remote manpages.

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

Sidebar

Related Questions

I've accidentally unhitched my master branch from tracking origin master I think. It used
We accidentally merged branch XYZ into DEV and pushed it to the origin repo.
I accidentally created a new changelist with files from WORKSPACE not from DEPOT and
I accidentally did a hg pull and it created a branch in my local
While attempting to create a replacement tablespace for USER, I accidentally created a datafile
I accidentally closed the Console window in Eclipse, and now I can't see the
I accidentally added a cloned git repository to a working copy clone of my
I accidentally deleted my bookmarked query in phpMyAdmin. Is there any way it can
I seem to have accidentally created Visual Studio 2010 tab groups which means that
.NET newbie alert Using Visual C# 2008 Express Edition I have accidentally created a

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.