Week 2: Git rebasing and more!

Git rebase

One of my tasks this second week was using interactive rebase to organize previous work.

Interactive rebase, git rebase -i, is a useful and powerful command that allows you to change your commits in many ways such as editing, deleting, splitting and squashing. You must indicate how far back you want to rewrite commits by telling the command which commit to rebase onto. In my case:

$git rebase -i HEAD~30

The execution of this command opens a Vim editor window, where you can apply the corresponding option to each commit. In my case the most used options were to amend commit messages (reword and edit), to merge commits (squash) and the trickiest one to me that was splitting commits, where I used a combination of edit, then a git reset and git add -p to add changes step by step.

After doing a rebase (and also in general), it is very important that your project compiles for every commit in your branch.

$git rebase -i -x “cmd” some-ref

executes cmd sequentially in every commit. With this command I tested that all my commits compiled.

My new work branch was ready!

Moving forward previous commits

In order to start coding and finishing conversion of git bisect from shell to C, previous work must be accepted by the community. So it is very important to move forward this previous work so it can be integrated in git project, as it is always easier to integrate in smaller changes than sending a big patch series.

This last week I selected some candidate commits to send as patches to the mailing list. The criteria is first try to detect and integrate small and not very complex commits that should be more easily approved.

At the end of the post, there is a list with the sent patches and their states.

Git bisect code.

In these last days I have been trying to understand code files related to git bisect to get familiar with its functions and calls, also reading past comments on git mailing list and previous Outreachy intern’s blog. All of these to get a global idea of what I am dealing with and to be able to contribute with suggestions.


This week Outreachy interns have had some paperwork to do. We had to fill up some payment forms and the first feedback questionaries.

See you next week!

Thank you for reading.


On review
Will queue

See also