FHIR Chat · abandon a branch · committers/git-help

Stream: committers/git-help

Topic: abandon a branch


view this post on Zulip John Moehrke (Oct 29 2018 at 18:18):

I created a branch on a clone of master core.. it is not building... but I started another clone that is building... so How do I abandon the branch on the bad clone, and kill that old clone so I get my harddrive (ssd) space back?

view this post on Zulip Lloyd McKenzie (Oct 29 2018 at 18:50):

I'm not sure what you mean by a "clone". If you want to delete a local branch, click on "switch branches", click on the elipses, right-click on the local branch and hit "delete".

view this post on Zulip John Moehrke (Oct 29 2018 at 19:03):

I am not sure about terminology with GIT... so I said clone, as that is the first step one takes https://github.com/HL7/fhir/wiki/Using-TortoiseGit-with-FHIR#create-a-local-clone

view this post on Zulip John Moehrke (Oct 29 2018 at 19:03):

my previous clone is failing on build... so I did another clone to a different location on my local drive... the new clone builds... so I want to abandon the old failing clone

view this post on Zulip John Moehrke (Oct 29 2018 at 19:04):

I do have a branch on that old broken clone... so I figure I must first kill that branch, before I can kill the clone

view this post on Zulip John Moehrke (Oct 29 2018 at 20:42):

I still can't get rid of this. If I try as Lloyd has recommended --- Could not delete reference. libgit2 returned: cannot delete branch 'refs/heads/moehrke_ii' as it is the current HEAD of the repository

view this post on Zulip Lloyd McKenzie (Oct 29 2018 at 21:09):

If it's just a local copy, you can delete the copy. If you've committed a branch, your other copy will retrieve that branch and make it available to switch to locally. If you never committed, then deleting the copy will delete the only reference to the local branch. It'll also delete any changes you've made to files in that copy.


Last updated: Apr 12 2022 at 19:14 UTC