This guide will walk you through the process of tracking Bitbucket Commit SHA using the terminal and exploring it seamlessly in Visual Studio Code with the GitLens extension.
Two Methods Tracking SHA Key :
Method 1: Terminal Tracking
Step 1: Open Terminal:
Step 2: Get Commit SHA:
git rev-parse HEAD
// get SHA Key 40 letter like This
// give last commit Key
123b333fa33379d33363333b333c3a83383333a
// get more previous commits key see this
git log -n 5
commit 333333333333223233333332 //SHA KEY
Author: userName <admin@mail.com>
Date: Mon Nov 27 2023
ETC....
....
....
copy SHA Key Replace with Exiting FilePath Live/http
https://bitbucket.org/ABC/RepoName/raw/<SHA-KEY>/Project-Name/XYZ.js
Method 2: Visual Studio Code with GitLens
Step 1: Install GitLens:
Step 2: Explore Commit Graph:
Explore Commit Graph
- Open the Source Control panel.
- Click on the clock icon to access the GitLens Timeline.
- Explore commits, branches, and tags visually.
Step 3: Obtain Source File Link:
- Click on a commit in the GitLens Timeline.
- Right-click on a changed file and choose "Copy Remote File URL."
OR
- Get Only SHA Key Like this :
Top comments (0)