extrawurst / gitui

Blazing 💥 fast terminal-ui for git written in rust 🦀
MIT License
18.5k stars 571 forks source link

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

Closed a-y-u-s-h closed 2 years ago

a-y-u-s-h commented 2 years ago

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.

extrawurst commented 2 years ago

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

a-y-u-s-h commented 2 years ago

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.

stale[bot] commented 2 years ago

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.