The real power of GitLens comes in when you have a project with multiple commits, branches, and contributors. You'll be able to efficiently track changes, understand code history, and get insights into your project's evolution.
Consult the GitLens documentation to configure VSCode properly and discover more functions.
If you haven't already, download and install Visual Studio Code and add the official Julia extension by typing "Julia" in Extensions. You are now ready to install GitLens: type "GitLens" in Extensions and install it.
On the left-side panel, you'll notice a new section added by GitLens, which provides different views like Repositories, File History, Line History, etc. Click around to see various details about your Git repository and its history.
If you already have existing repositories, you can inspect them by expanding 'Repositories':
If you don't have existing repositories or want to create a new Julia project, follow the steps below to set it up:
- Create a new folder for your Julia project
- Launch VSCode, and open the folder you created by clicking on
File > Open Folder.
- Initialize a Git repository by opening the terminal in VSCode (
View > Terminal) and typing:
- Create a new Julia file and populate it with some content.
- Commit your changes by opening the terminal and typing:
git add . git commit -m "Initial commit"
Provided there were no Git-related errors, you should be able to see the commit in the following panel:
While GitLens supercharges your Git experience in VSCode, remember that standard Git operations like
pull, etc., can be performed through the standard VSCode source control interface or through the terminal.
GitLens offers a plethora of other features, such as:
- Viewing who changed a line and when.
- Exploring the history of a file or line.
- Viewing a Git blame annotation.
To explore these features, you can:
- Hover over the line numbers in your code. GitLens will display who modified the line and when.
- Click on the file or folder in the explorer view. You will see the number of changes on the right.
Make sure to explore the GitLens documentation to discover more features tailored to your own workflows and tastes.