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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T05:18:49+00:00 2026-05-23T05:18:49+00:00

In my project I created a new branch for a new feature, finished the

  • 0

In my project I created a new branch for a new feature, finished the feature and merged the branch back into my development branch. I then followed the instructions to delete the branch locally and on my github origin repo.

I then noticed that all mentions of my branch, both locally and remotely, are completely gone. I can’t see any indication that the branch even existed at some point of time. This is scary because what if I bring another developer on (or hell if I even do this) and instead of deleting a feature branch on GitHub he deletes the development branch. The only indication I will have is one less branch showing up with no indication of why.

One of the major reasons to use source control is to have a complete history of everything that happened to your source, and this seems to run contrary to it, unless I am missing something. What I would prefer is some way to mark a branch as closed so it doesn’t accept any more changes, but you still have the log of the progression of the branch, who closed it and why it was closed (did the feature not work out correctly and it had to be redone, was it finished, etc..) and who closed it.

Since I can’t find any way to do that is there any way to at least secure who is allowed to delete a branch and who doesn’t have access to it? Or is there a way to view deleted branches?

  • 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-23T05:18:49+00:00Added an answer on May 23, 2026 at 5:18 am

    Deleting a branch in git does really delete the branch. If this is not what you want to do, don’t delete the branch. However, deleting a branch by itself doesn’t remove any of your project history; it just removes the reference to the end of the branch. All the commits on the branch are still there; there’s just no obvious way to find them.

    You can’t prevent someone who has access to your repository from deleting a branch. That’s why it’s usual in github for every person to have their own repository to work in. If a branch is deleted, you’re the one who did it.

    If you delete a branch yourself by mistake, you can get it back if you know the commit id of the tip of the branch (which will be recorded in the commit where you merged it into your main development line, or in the reflog). Create and checkout a new branch with the name of the deleted branch, and use git reset to tie that branch name with the tip commit again.

    From your question, it seems like you want to keep track of the state of the branch forever. The right way to do that is to create a tag at the end of the branch. You can then delete the branch but the reference to the tip (and all its history) will live on in the tag.

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

Sidebar

Related Questions

I created a new branch of my project and now when I try to
Story: in the middle of a project my colleague created a new branch from
i have one doubt,i have created new project in eclipse with android 2.3.1 and
i'm using eclipse platform and window builder pro within. I've already created new project
Lets go from the start Created New Xcode project,opened interface builder dragged one NSButton
I have a new Codeblocks install with mingw32 compiler. Created new c++ console project
I created a new project, Windows Phone 7.0 Since i wanted the DockPanel, i
I created a new project with the following code segment: char* strange = (Strange??);
I created a new project in Eclipse called Lottery. The first thing that happened
I created a new cordova project on XCODE, I have some files that I

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.