gitless icon indicating copy to clipboard operation
gitless copied to clipboard

Hard (impossible?) to start a repo with branch other than master

Open stevage opened this issue 8 years ago • 3 comments

I want to create a repo that is only gh-pages. I did this:

  1. gl init
  2. gl branch -c gh-pages
  3. gl switch gh-pages

Problem: Gitless just deleted all my files. They're all in the master branch, but there are no commits.

gl fuse master
no commits to fuse

The only workaround I could find was to commit everything in the master branch then fuse it.

Is there a better way, or is this just a limitation?

stevage avatar Jan 10 '17 00:01 stevage

Get back to master using

gl switch master

You should find back your un committed files.

Then do a

gl switch gh-pages -mo

This will move over your uncommitted modified files and untracked files to the gh-pages branch.

Does this solve your issue ?

chmike avatar Jan 10 '17 06:01 chmike

Thanks, that works. I guess the issue is - can it be made more intuitive, or easier to discover?

stevage avatar Feb 01 '17 02:02 stevage

I had the same problem. That's why I knew how to do it. It's a documentation issue. It is described, if I remember well, but it would deserve to be more visible like a dedicated section.

chmike avatar Feb 01 '17 09:02 chmike