Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » Delete Local Branch
Delete Local Branch [message #1635166] Wed, 25 February 2015 17:00 Go to next message
Jeff Matthews is currently offline Jeff MatthewsFriend
Messages: 3
Registered: February 2015
Junior Member
I created a local repository for my project.

* Created a branch off the Master branch that was initially created.
* Made my additions/modifications in the branch.
* Successfully merged branch back into the original Master branch.

I don't see any reason on keeping the branch I had created because all the modifications/additions and so forth got merged. Therefore, I should be able to delete the branch, correct?

Would there be any negative repercussions in doing that?
Re: Delete Local Branch [message #1635442 is a reply to message #1635166] Wed, 25 February 2015 20:08 Go to previous message
Matthias Sohn is currently offline Matthias SohnFriend
Messages: 1133
Registered: July 2009
Senior Member
right, if you don't need a local branch anymore just delete it, or rename it if you want to use it for a different purpose.
In Git a branch is just a named pointer to a commit, you could also use git without using a branch but then you
would need to remember SHA1 of a commit you are interested in, and humans tend to prefer a name they can
remember more easily. When you create a new commit the currently checked out branch (HEAD points at)
moves to the new commit. This way you can use the same (branch) name to refer to the growing history of
your project. If you do multiple things in parallel (different features, bug fixes) you best do that on separate
branches until your work is ready to be merged to a long living branch (most often the master branch
on the shared repository stored on some git server.
Previous Topic:Pushing to a repository with EGit not working when it works with command-line git
Next Topic:Indexing gen folder
Goto Forum:
  


Current Time: Thu Apr 09 08:13:33 GMT 2020

Powered by FUDForum. Page generated in 0.01979 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top