It’s pretty neat for when you want to find someone to blame. If you want to see more information than just the author name and the date modified, just right click on the annotated area, go into View then select what you want to see. Download the latest Visual Studio Preview and check out the following new Git features. It does exactly what git blame does – but in a nicer, IDE-friendly way. January 6th, 2022 13 0 We continue to enhance the Git experience in Visual Studio, and we are excited to announce some long-awaited updates in version 17.1 Preview 2. That’s what they call it in Android Studio (and IntelliJ and possibly other JetBrains IDEs). Annotations for the most recently changed lines in the file are marked with bold. But I think it is important to clarify that this refers to lines modified in the current revision of the file, not the current revision of the repository. Shouldn’t Android Studio provide some sort of functionality that works with this? Introducing Annotate Annotations for lines modified in the current revision, are marked with bold type and an asterisk. This works great when you’re working from the command line, but it seems a bit too primitive to use when you have the power of an IDE. In this example you only see my name because apparently I’m the only one who last modified each line of this file at the same time (which likely means that this was when the file was created and it has not been updated since), but depending on the situation it could mention multiple authors, timestamps and short hashes. You can see who last modified each line, when the change was made as well as the short hash of the relevant commit. You should see something this: Output of git blame If you already know where in the code the bug is but want to find the commit that introduced it, you can use git blame. If you’re not familiar with git blame, go ahead and try it on the command line: $ git blame - path/to/my/source/file Now, git credit does the same job as git blame Its a tiny tiny change. We can use some alias All you have to do is run this command: git config -global alias.credit blame. It does pretty much what it sounds like: it lets you blame each line in a file to whoever last made changes to that line. Turns out its not that complicated if you are some weird person like me who likes to use positive language in your git commands. It enhances your code editor with inline Git blame annotations, code lens, and other helpful features. If you use git in your software projects, you might be familiar with the git blame command. 8 GitLens - GitLens supercharges your Git workflow within VS Code.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |