Git rebase -i is not that scary
cachebag.sh
Git rebase -i is not that scary
1–10 of 155 posts
Re: Git rebase -i is not that scary
#2it's the one clear tool that i used all the time. moving to jj, it has lots of amazing tools starting with `jj edit` to go change the past safely & conveniently, with much less pain. but i miss the direct powerful data-driven experience of seeing the timeline in a text file, and picking what to do with it. sometimes.
imo every dev should work to get some competency with git rebase! it's an amazing tool. there's few other systems that give such direct control. it's top layer is, perhaps, the excel of version control?
Re: Git rebase -i is not that scary
#3 x git commit --amend --reset-author --no-edit
I use that one very frequently (after a fixup, of course) because I want the author date on amended commits to reflect the last time I edited them, not the first time I committed them.Re: Git rebase -i is not that scary
#4I wish there were a shorthand for x git commit --amend --reset-author --no-edit I use that one very frequently (after a fixup, of course) because I want the author date on amended commits to reflect the last time I edited them, not the first time I committed them.
> git config --global alias.whatever_you_want 'commit --amend --reset-author --no-edit'
https://git-scm.com/book/ms/v2/Git-Basics-Git-AliasesRe: Git rebase -i is not that scary
#5I wish there were a shorthand for x git commit --amend --reset-author --no-edit I use that one very frequently (after a fixup, of course) because I want the author date on amended commits to reflect the last time I edited them, not the first time I committed them.
Re: Git rebase -i is not that scary
#6Re: Git rebase -i is not that scary
#7Re: Git rebase -i is not that scary
#8Besides interactive rebase, my other favorite command is “git log —-oneline origin/master..HEAD”
It shows me exactly where I am…
Re: Git rebase -i is not that scary
#9I do still find myself tripping up on whether the next appropriate step is to make a commit or continue the rebase, as that is dependent on if you're in a merge conflict or just editing a commit. But even when I get that wrong, and collapse two commits together, abort saves the day.
Re: Git rebase -i is not that scary
#10I know you can do this from within magit as well but I've never gotten into that workflow.