gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Orphan Branches and/or empty new branches (orphan + all files removed).

Open a-y-u-s-h opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. It's a very common use case where you have a codebase but you want to create a branch with no files in it. So you first create an orphan branch like so:

git checkout --orphan <branchname>

This will create a new branch with no parents. Then, you can clear the working directory with:

git rm --cached -r .

And then you add the files, commit them and push them to github as a separate branch.

Describe the solution you'd like An option in gitui that allows us to create an orphan branch.

Describe alternatives you've considered The commands above.

a-y-u-s-h avatar Mar 07 '22 12:03 a-y-u-s-h

How does this work in common git GUIs? Is that two steps there aswell?

extrawurst avatar Mar 07 '22 18:03 extrawurst

How does this work in common git GUIs? Is that two steps there aswell?

Not really sure. I haven't used any git GUIs other than Gitui.

a-y-u-s-h avatar Mar 08 '22 09:03 a-y-u-s-h

This issue has been automatically marked as stale because it has not had any activity half a year. It will be closed in 14 days if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Sep 28 '22 04:09 stale[bot]