Linked Questions
12 questions linked to/from Creating a new empty branch for a new project
0 votes
0 answers
46 views
How do I make a new branch in git with no commits [duplicate]
I have a local repo for a website I am helping make. I edited some element of the page and I wanted to push the change. The leader of the site project told me to make a new branch, e.g enhancements/...
412 votes
10 answers
136k views
In git, is there a simple way of introducing an unrelated branch to a repository?
While helping a friend with a git problem today, I had to introduce a branch that needed to be totally separate from the master branch. The contents of this branch really had a different origin from ...
199 votes
4 answers
53k views
How to create a new (and empty!) "root" branch?
I would like to define a new "root" branch in this git repository. By "root" branch I mean a branch that is entirely independent of all the other branches in the repository1. Unfortunately, even the ...
12 votes
2 answers
19k views
Create an empty branch?
I have a git repo containing a project. I now am going to do a massive overhaul of the project. How can I create a new branch for this overhaul that is blank? Then when complete. How can I switch ...
4 votes
3 answers
1k views
Move prototype code out of master branch with git
The master branch of a new project's git repo contains only prototype/spike code. I'm about to re-start the coding from scratch, now that I have the basic ideas understood. I want the master branch ...
6 votes
2 answers
5k views
How to create an empty master and raise a PR from existing branch
I have a single branch in my repo: develop. Code has already been committed and pushed in there. There's no master branch in the repo. I'd like to create a master branch so I can raise a Pull ...
0 votes
2 answers
4k views
Make an empty branch via visual studio team services
I don't know how to make an empty branch, whenever I make a branch, all of the 'master' branch items gets putted in the new branch...
0 votes
2 answers
3k views
Can I create a new branch which does not have any files from the master branch?
Can I create a branch from the master, without any of the content held on the master branch being copied over to the new branch? Can I do this, and what is the git command to do it, is it possible?
1 vote
1 answer
824 views
Can git checkout to remote branch without pulling files?
I need to create an empty orphan branch from another remote branch. The problem is if I checkout to the parent branch, it will pull the files, and those will then be included in the orphan branch. Or ...
2 votes
1 answer
420 views
git copy one commit to new branch
I would like to create a new branch with a copy of one particular commit only (from master, i.e.). How do I do that? The closest I got to that is something like: git checkout --orphan NEWBRANCH git ...
-2 votes
2 answers
169 views
Github Feature branch issue
We have a requirement, where we have to create a feature branch in Github repository. But the problem is whenever I am creating the feature branch, the contents of master is getting replicated in the ...
1 vote
1 answer
81 views
create a master branch after all my work has already been committed in develop branch
I have created a repository for my project, and there has been only a "develop" branch. I just forget to create a "master" branch at the beginning. Now, All my work is on the "develop" branch. Now, I ...