Skip to main content



      Home
Home » Eclipse Projects » EGit / JGit » Delete Local Branch
Delete Local Branch [message #1635166] Wed, 25 February 2015 12:00 Go to next message
Eclipse UserFriend
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 15:08 Go to previous message
Eclipse UserFriend
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: Mon Jul 07 11:54:45 EDT 2025

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

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

Back to the top