DEV Community

Cover image for Bit-Bucket Commit SHA Track using Terminal
Fazal
Fazal

Posted on

Bit-Bucket Commit SHA Track using Terminal

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....
.... 
....

Enter fullscreen mode Exit fullscreen mode

copy SHA Key Replace with Exiting FilePath Live/http

https://bitbucket.org/ABC/RepoName/raw/<SHA-KEY>/Project-Name/XYZ.js

Enter fullscreen mode Exit fullscreen mode

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 : Image Copy GUI VSCODE

AWS GenAI LIVE image

Real challenges. Real solutions. Real talk.

From technical discussions to philosophical debates, AWS and AWS Partners examine the impact and evolution of gen AI.

Learn more

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Dive into this thoughtful piece, beloved in the supportive DEV Community. Coders of every background are invited to share and elevate our collective know-how.

A sincere "thank you" can brighten someone's day—leave your appreciation below!

On DEV, sharing knowledge smooths our journey and tightens our community bonds. Enjoyed this? A quick thank you to the author is hugely appreciated.

Okay