Is it possible to remove the develop branch and install another branch instead? If so, how?

  • Tell us better, why do you need it? What purpose? - Nick Volynkin

1 answer 1

Most likely you just need to just rename the branch.

Is it possible to do this in the source tree - I do not know, but it can definitely be done in a regular console. Open the console and write

git branch -m develop новая_ветка 

if the "new_flow" already exists, then either it must first be deleted, or simply write a large M

 git branch -M develop новая_ветка 

In git, commits don't know which branch they belong to, so if you just rename a branch, then commits won't know about it.

But one thing still remains - the branches in the remote repository. And here you can just forget about the develop branch on the server (it can be used by other users). Therefore, first you need to send the branch to the remote server - git push -u origin новая_ветка , and develop the branch itself on the server.

I know that some here love the source tree very much and even minus me for criticizing this program, but I still do not recommend using it.

PS - if you still want to do this in the source tree - try to right-click on the name of the branch and search for "rename" there.

  • Will she have develop'a function? - Waver
  • And what is the function of develop'a? - KoVadim
  • It will be possible to create podvetki - Waver
  • branches can be created from any branch and from any commit. Since the name of the branch is just the alias of the commit, by renaming the branch, the functionality of the branch does not change. Well, except for the name. - KoVadim
  • Plus for criticizing SourceTree) - Nick Volynkin