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 bra
Although the solution with git symbolic-ref and removing index works, it might be conceptually cleaner to create new repository
$ cd /path/to/unrelated
$ git init
[edit and add files]
$ git add .
$ git commit -m "Initial commit of unrelated"
[master (root-commit) 2a665f6] Initial commit of unrelated
1 files changed, 1 insertions(+), 0 deletions(-)
create mode 100644 foo
then fetch from it
$ cd /path/to/repo
$ git fetch /path/to/unrelated master:unrelated-branch
warning: no common commits
remote: Counting objects: 3, done.
Unpacking objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
From /path/to/unrelated
* [new branch] master -> unrelated-branch
Now you can delete /path/to/unrelated