@@ -208,3 +208,68 @@ and repair broken history.
208208- Language: C, optional choice of scripting language
209209- Difficulty: medium
210210- Possible mentors: Jeff King / Michael Haggerty
211+
212+ ### Line options for ` git rebase --interactive `
213+
214+ One of the more powerful features in Git is the command `git rebase
215+ --interactive`, which allows recent commits to be reordered, squashed
216+ together, or even revised completely. The command creates a todo list
217+ and opens it in an editor. The original todo list might look like:
218+
219+ pick deadbee Implement feature XXX
220+ pick c0ffeee The oneline of the next commit
221+ pick 01a01a0 This change is questionable
222+ pick f1a5c00 Fix to feature XXX
223+ pick deadbab The oneline of the commit after
224+
225+ The user can edit the list to make changes to the history, for example
226+ to
227+
228+ pick deadbee Implement feature XXX
229+ squash f1a5c00 Fix to feature XXX
230+ exec make
231+ edit c0ffeee The oneline of the next commit
232+ pick deadbab The oneline of the commit after
233+
234+ This would cause commits ` deadbee ` and ` f1a5c00 ` to be squashed
235+ together into one commit followed by running ` make ` to test-compile
236+ the results, delete commit ` 01a01a0 ` altogether, and stop after
237+ committing commit ` c0ffeee ` to allow the user to make changes.
238+
239+ It would be nice to support more flexibility in the todo-list commands
240+ by allowing the commands to take options. Maybe
241+
242+ * Convert a commit into a merge commit:
243+
244+ pick -p c0ffeee -p e1ee712 deadbab The oneline of the commit after
245+
246+ * After squashing two commits, add a "Signed-off-by" line to the
247+ commit log message:
248+
249+ pick deadbee Implement feature XXX
250+ squash --signoff f1a5c00 Fix to feature XXX
251+
252+ or GPG-sign a commit:
253+
254+ pick --gpg-sign=<keyid> deadbee Implement feature XXX
255+
256+ * Reset the author of the commit to the current user or a specified
257+ user:
258+
259+ pick --reset-author deadbee Implement feature XXX
260+ pick --author="A U Thor <[email protected] >" deadbab The oneline of the commit after 261+
262+ See [ this
263+ discussion] ( http://thread.gmane.org/gmane.comp.version-control.git/242701 )
264+ on the mailing list for more related ideas.
265+
266+ The goal of this project would be (1) to add the infrastructure for
267+ handling options on todo-list lines, and (2) implement some concrete
268+ options. A big part of the difficulty of this project is that `git
269+ rebase --interactive` is implemented via a sparsely-commented shell
270+ script. Adding comments and cleaning up the script as you go would be
271+ very welcome.
272+
273+ - Language: sh
274+ - Difficulty: medium
275+ - Possible mentors: Michael Haggerty
0 commit comments