git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [Feature request] An easier way of rebasing if you just want to "force send" a file back to a previous commit
@ 2020-01-12 19:42 1234dev
  2020-01-12 19:56 ` brian m. carlson
  0 siblings, 1 reply; 5+ messages in thread
From: 1234dev @ 2020-01-12 19:42 UTC (permalink / raw)
  To: git@vger.kernel.org

Hello!

I'm pretty new to all of this, but I was wondering. Is there an easier way of rebasing if you just want to force send a file back to a previous commit? Rebasing can get quite tiresome in the long run. It's like 7 steps, and that's without the merge conflicts someone with my luck is guaranteed to run into.

For instance, say I've made changes to a file. Those changes are too tiny and insignificant to make a new commit out of - they actually ought to be part of a commit I made last night.

If there just was a way to cheat :) I'm aware it would rewrite my entire history but that's okay, I haven't shared my repo with anybody yet. Maybe something along the lines of "git rebase --off-she-goes <file> <hash>"?

As opposed to "git stash && git rebase --interactive '<hash>^' && <change pick => edit> && <apply changes manually> && git add <file> && git commit --amend && git rebase --continue && git stash pop && <merge conflict that requires manual intervention> && git rebase --continue && git stash pop && <still a conflict> && rm <file> && git checkout <file> && <repeat the whole process> && <still a conflict> && <go to IRC and ask for help>

Might have gotten the above sequence of commands a bit wrong, I just learned how to rebase a few days ago. But hopefully y'all get my point.

Thanks!


Sent with ProtonMail Secure Email.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-01-13 14:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-12 19:42 [Feature request] An easier way of rebasing if you just want to "force send" a file back to a previous commit 1234dev
2020-01-12 19:56 ` brian m. carlson
2020-01-12 20:41   ` 1234dev
2020-01-12 20:45   ` Taylor Blau
2020-01-13 14:13     ` 1234dev

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).