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

How is generative AI increasing efficiency?

Join AWS GenAI LIVE! to find out how gen AI is reshaping productivity, streamlining processes, and driving innovation.

Learn more

Top comments (0)

AWS Q Developer image

Your AI Code Assistant

Generate and update README files, create data-flow diagrams, and keep your project fully documented. Built to handle large projects, Amazon Q Developer works alongside you from idea to production code.

Get started free in your IDE

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay