0

I have a rough part of my workflow, wondering if magit is the solution. So when I'm working on a task, I spin off a branch like most people.

I end up putting 5 or 6 commits in a branch that's for my personal use, not to be pushed to the outside world. Ideally they should be positioned at the tip of the branch, for easy removal if needed, and also to be able to use "the semicolon technique" to push to GitHub "only up to a certain commit" of a branch.

My problem is, with this kind of practice, often these "personal" commits get sandwiched between legit commits, so I have to use magit rebase to re-move the personal commits to the tip of the branch frequently.

Does magit have a feature to overcome this? Anyone else have this problem? I was thinking, what if there a tool that

when I do git commit -m "work" it puts the commit 5 steps up the commit tree, so the new commit appears before my "personal" commits.

1 Answer 1

2

Does magit have a feature to overcome this?

Magit doesn't have a feature along the lines of what you describe.

I'd recommend that you not store the private and public commits on the same branch. Switch to the public branch to make public commits, then sync that branch with another branch that has the private commits. Depending on your tastes, you could do that by either (1) rebasing the private branch on top of the public or (2) merging the public into the private branch.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.