Closed matthiasr closed 2 months ago
Hello! Yes, that's a valid workflow as well. I would be happy for git-spice to support it.
First, I want to mention what is already possible:
You can currently do git checkout -b
and gs branch track
to get a branch without a commit.
git checkout -b foo && gs btr # (shorthand for branch track)
Next, for a less boilerplate-y workflow:
I'm supportive of adding a --no-commit
flag [^1] to gs branch create
which skips over all the committing logic, and just creates the branch, updates internal storage, and that's it.
We could also add a configuration option (maybe spice.branchCreate.commit
) that would allow you to set that flag by default. Then you'd be able to use gs branch create --commit
for cases where you do want to commit.
[^1]: ...or rather a --commit
flag that defaults to true, with a --no-commit
negation for it.
I use branches as a "work context", and commits as an extended save, often cleaning them up later.
When I work on something new, I tend to
Usually, by the time I commit for the first time, I have at least a rough idea of the shape of what I'm working on, but I don't when I create the branch. However,
git-spice
forces me to immediately make a commit, typing out at least some kind of message, to even create the branch.I would prefer if
gs branch create
would only create the branch, still having it point at the same commit as the parent, likegit checkout -b
. Ings log long
, I would expect this to look just likegs log short
with no commit below the branch name.I recognize that this is very much a matter of taste but wanted to register the preference 😄