![]() ![]() More often, we (as engineers) can easily gauge whether a commit is relevant for our search based on commit message, author, and coding practices. Usually, this allows to hide some of the more trivial commits but requires git to detect them as such. Most of them are not only available on the command line though, they're usually available in the various editors as well (feel free to show how it's done in your editor and share on Twitter). Ignore changes if the line was just moved/copied from other files Ignore changes if the line was just moved/copied within the same file Assuming it's a simple move within the file or a whitespace fix, we can ignore those using the flags that git blame offer us: ![]() Moving Backwards In TimeĪ simple git blame shows us only the most recent changes. ![]() We need to carefully remove layer by layer of sand and dirt that has been swept over the real changes to unearth them. At first glance, we only see the most recent changes, not the most important ones. But on most non-trivial projects, you usually end up with a refactoring commit, a rename, or a trivial cross-project fix like switching to another assertion library. Most people will start with using "git blame" (or the respective functionality within their IDE/editor). Usually, we resort to looking at the commit that introduced the change or the tickets associated with the commit. Tests usually provide a pretty good context but depending on their granularity and naming, they might only tell is "what" is in the implementation but miss the "why".Īnd if we try to decide whether we can remove a certain check or rework a behavior, we need to understand why it was introduced in the first place. As software engineers, we have to make so many micro-decisions every minute that we're pretty used to it.ĭepending on the code and domain knowledge, we often find ourselves in situations where we need more context to make an informed decision. Generally not dramatic, it happens quite often that I'm stopping what I'm doing because I need to decide on how to move forward. When working on refactorings or bug fixes, I often end up in areas I might not be too familiar with. Be it whether you're new to a codebase, or you've been focused on a specific area of the codebase. Working on a large codebase, it's pretty normal to not remember every small or large subsystem or implementation choice. He has been an active committer of the world-class Eclipse IDE (Platform, Java, Git). Benny has been following his passion of building tools for improving developer productivity. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |