It’s actually quite neat, it shows the Gravatar associated with the commit’s email, and shows older commits with a darker gray background. If your code is up on GitHub, you get blame information included:Īnother great way to see this information is with git-age, which is a viewer written in PyGtk. Update Git 2.18 (Q2 2018): 'git blame' learns to unhighlight uninteresting metadata from the originating commit on lines that are the same as the previous one, and also paint lines in different colors depending on the age of the commit. You can specify a revision for git blame to look back starting from (instead of the. That’s great and all, but there’s plenty of other ways to get your blame on. When you are interested in finding the origin for lines 40-50 for file foo, you can use the -L option like so (they mean the same thing both ask for 11 lines starting at line 40): git blame -L 40,50 foo.txt git blame -L 40,+11 foo.txt. The console output usually looks like so (check out the full image!):įor those confused at what this wall of text consists of, it shows the abbreviated commit SHA, the file name it originated from, the commit author and date, line number, and then the actual line of code. Select any two commits in the Log tab of the Git tool window Alt+9 and choose Compare Versions from the context menu. Luckily, the git blame command can help with figuring out exactly who’s responsible for which line and what commit it came from. PhpStorm allows you to check which files were modified between two commits instead of having to browse the changes in each commit in between. Or maybe not, you just want to know who broke the build. This will print author and revision numbers on a per-line basis for the specified target. At the command line, you can use Git to view details about the commits in a local repo or a CodeCommit repository. Sometimes you may find it necessary to figure out just who committed that bug, or perhaps compliment a coworker on how efficiently an algorithm was implemented.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |