3 ms·
Lack of a good way to edit recent history. Suppose I sit down for a collaborative session with someone. Over the course of a few hours, we might generate 10-10
by yummyfajitas 17y ago
Lack of a good way to edit recent history.
Suppose I sit down for a collaborative session with someone. Over the course of a few hours, we might generate 10-100 commits between the two of us, and several branches, all to implement a single feature. I.e., I commit, say "hey, pull from me, you had an off by one a few minutes ago."
At the end of the session, we only want to generate a single commit to the public repositories.
Mercurial queues are a tolerable way to handle this, but they aren't great.
- nuclear_eclipse 17y agoGit makes this easy. It supports "rebasing" commit trees, and for what you want, a "squashed" rebase is absolutely trivial to do.
- vtail 17y agogit rebase --interactive <commit> should help http://stackoverflow.com/questions/598672/git-how-to-squash-the-first-two-commits http://stackoverflow.com/questions/598672/git-how-to-squash-... and http://stackoverflow.com/questions/435646/how-do-i-combine-the-first-two-commits-of-a-git-repository/436530#436530 http://stackoverflow.com/questions/435646/how-do-i-combine-t...
- dalore 17y agoI do this all the time with git. I create a branch, do all my incremental commits, get it all working. Then I merge it into the mainline as one squashed commit. There a few guides on how to do it with the command line but I'll admit I've gotten lazy and now just use smartgit which lets me do it easily without having to remember the commands.
- prog 17y agogit already has this in core and bzr has a rebase plugin[1]. I think this problem has been solved for quite some time now :) [1] http://doc.bazaar.canonical.com/plugins/en/rebase-plugin.html http://doc.bazaar.canonical.com/plugins/en/rebase-plugin.htm...