A
A
Alexey2017-03-03 21:16:52
git
Alexey, 2017-03-03 21:16:52

Is it possible to close branches in git?

Let's say I have a situation where 2 more (or more) branches were created from one commit. One of these branches will continue to work, and the rest are no longer needed, but I would like to leave the commits from these branches in history, because. maybe they will come in handy someday.
d2c96face43f4d7e9313fe5b49102f8f.JPG
Should I leave these branches? But in this way a lot of extra branches can accumulate. It is possible to close branches in git after a pull request, but is it possible to close them without it?
I searched the Internet and did not find the answer, but I found that it is possible to close branches in Mercurial. But I read that mercurial does not work well with text files (merge unit scenes). Keeping the history is not very important, but it is necessary that such commits be saved too. If, nevertheless, there are no such opportunities in git, is it worth using mercurial?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Saboteur, 2017-03-04
@Alexeee

> In git, branches can be closed after a pull request, but can they be closed without doing so?
There are no pull requests in the git, they are in bitbucket, github, etc. and "closing a branch" is usually deleting a branch.
Commits will be in the branch where they are frozen.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question