Linked Questions

0 votes
0 answers
46 views

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/...
Hydrolox's user avatar
412 votes
10 answers
136k views

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 ...
hillu's user avatar
  • 9,661
199 votes
4 answers
53k views

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 ...
kjo's user avatar
  • 35.7k
12 votes
2 answers
19k views

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 ...
panthro's user avatar
  • 24.2k
4 votes
3 answers
1k views

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 ...
Andrew Davey's user avatar
  • 5,471
6 votes
2 answers
5k views

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 ...
RootTunes's user avatar
0 votes
2 answers
4k views

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...
CeSuX Weeder's user avatar
0 votes
2 answers
3k views

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?
lio's user avatar
  • 459
1 vote
1 answer
824 views

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 ...
HamletHub's user avatar
  • 561
2 votes
1 answer
420 views

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 ...
KcFnMi's user avatar
  • 6,367
-2 votes
2 answers
169 views

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 ...
Shovan Mandal's user avatar
1 vote
1 answer
81 views

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 ...
Leem's user avatar
  • 18.5k