Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create an empty branch

Tags:

svn

Subversion 1.6 Ubuntu 10.4

I have a project with the following repository layout.

proj/trunk
proj/branches/new_feature1/
proj/branches/new_feature2/
proj/tags

However, I would like to create a small test app, that isn't a new feature. Just just testing a small aspect of the project. I would like to create this test_app on a new branch. However, I don't want to have to copy from trunk to branch. I just want to create a new empty branch so that I can develop this test_app.

Is there any way to do this?

Many thanks for any suggestions,

like image 793
ant2009 Avatar asked Jun 03 '10 07:06

ant2009


People also ask

How do I create an empty branch?

To create empty branch, you have to go to terminal and execute: git checkout --orphan branchname git rm -rf . Only after that you may see the new branch on GUI.

Can we create empty branch in Gitlab?

Git Create Empty Branch We can use --orphan command line option to create a new branch with no parents. The above command will create a new branch with no parents. Now, you can delete files from the working directory, so they don't commit to a new branch.


2 Answers

You can use svn mkdir to create the directory, and then use svn co to check it out:

svn mkdir http://path/to/svn/repository/branches/experimental_project
svn co http://path/to/svn/repository/branches/experimental_project project
like image 60
Michael Aaron Safyan Avatar answered Nov 15 '22 22:11

Michael Aaron Safyan


One way would be to check out your branches, add a new empty branch, svn add the new branch then commit. You could probably do the same from the command line directly into the repo.

like image 27
High Performance Mark Avatar answered Nov 15 '22 22:11

High Performance Mark