![]() Just add the -reverse option to your command: git blame index. When you are interested in finding the origin for lines 40-60 for file foo, you can use the -L option like so (they mean the same thing both ask for 21 lines starting at line 40): git blame -L 40,60 foo git blame -L 40,+21 foo. You can also show line changes in reverse with git blame, meaning starting at the bottom, and going up. The -L option, which limits annotation to a range of lines, may be specified multiple times. Showing line changes from the bottom up (reversed) with git blame Will produce an output like this: ^665221a index.js (Johnny Simpson 20:58:04 +0100 16) import dotenv from 'dotenv' descendant commits are shown before their parents). topo-order This option makes them appear in topological order (i.e. ![]() Since Git 1.8. Commit Ordering By default, the commits are shown in reverse chronological order. 12 Answers Sorted by: 809 See also Git: discover which commits ever touched a range of lines. This will show the file name along with the commit ID. A git repository is a tree of commits, it is not a list. To show the filename with git blame, use the -f option. -color-by-age colors lines by their age.-color-lines colors lines if the line before was a different commit.The git blame command does not show us the full commit hash but shows only the abbreviated commit. If you want to differentiate different commits and changes by color, you can use the -color-lines or -color-by-age: l: The -l option or flag is used to the full commit hash. To do this, you can use the -w option: git blame index.js -wįormatting lines with color using git blameīy default, git blame produces a wall of white or black text. You can also ignore whitespace with git blame, should your code contain a lot of it. If you’re interested in the format of git blame, it breaks down like this: ^665221a (Johnny Simpson 20:58:04 +0100 10) import from 'url'
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |