You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here are the slides: (in PowerPoint, so the animations can be viewed) git-talk-5March.pptx
Impact
Do:
When trying to understand a piece of code in a software project, consider using git log rather than git blame.
When trying to pin down the root cause of a bug, consider debugging with git bisect
Believe:
git log can help developers determine how a certain unit of code ended up in its current state. Unit of code = package, class, function, or even a line
git bisect speeds up the process of identifying problematic commits
Know:
git log allows commit history to be filtered in many ways (by directory, time period, line numbers, line content)
git bisect uses binary search to look through a set of specified commits
WIIFY
In mature projects, git could be one of the reliable methods of understanding technical decisions, especially since documentation may not always be complete and senior team members may have left the project. Alternatively, git can be used to do some background research before we approach others with our questions.
Key points
git blame is not always the most suitable tool for understanding how a piece of code ended up in its current state.
git log allows us to zoom in on the history of a specific unit of code, because it allows commit history to be filtered in many ways (by directory, time period, line numbers or even a function name)
git bisect allows us to partially automate the process of finding problematic commits
anubh-v
changed the title
Lightning talk: Using git to understand legacy code ("code archeology")
Lightning talk: Using git to understand legacy code
Feb 7, 2020
anubh-v
changed the title
Lightning talk: Using git to understand legacy code
Lightning talk: Using git to understand and debug software
Mar 4, 2020
Here are the slides: (in PowerPoint, so the animations can be viewed)
git-talk-5March.pptx
Impact
Do:
git log
rather thangit blame
.git bisect
Believe:
git log
can help developers determine how a certain unit of code ended up in its current state. Unit of code = package, class, function, or even a linegit bisect
speeds up the process of identifying problematic commitsKnow:
git log
allows commit history to be filtered in many ways (by directory, time period, line numbers, line content)git bisect
uses binary search to look through a set of specified commitsWIIFY
git
could be one of the reliable methods of understanding technical decisions, especially since documentation may not always be complete and senior team members may have left the project. Alternatively,git
can be used to do some background research before we approach others with our questions.Key points
git blame
is not always the most suitable tool for understanding how a piece of code ended up in its current state.git log
allows us to zoom in on the history of a specific unit of code, because it allows commit history to be filtered in many ways (by directory, time period, line numbers or even a function name)git bisect
allows us to partially automate the process of finding problematic commitsReferences
(adapted an example of a commit from here, used to show the problem with
git blame
)(obtained some slide design ideas from here)
The text was updated successfully, but these errors were encountered: