Questions tagged [gitlens]

GitLens is an open-source extension for Visual Studio Code, created by Eric Amodio.

GitLens supercharges the Git capabilities built into Visual Studio Code. It helps you to visualize code authorship at a glance via Git blame annotations and code lens, seamlessly navigate and explore Git repositories, gain valuable insights via powerful comparison commands, and so much more.

GitLens simply helps you better understand code. Quickly glimpse into whom, why, and when a line or code block was changed. Jump back through history to gain further insights as to how and why the code evolved. Effortlessly explore the history and evolution of a codebase.

https://gitlens.amod.io/

44 questions
2
votes
1 answer

How can I revert certain lines from old commit?

Let's say that I have 2 files: App.js Home.js They are already tracked and exist in first commit. And I add a new feature to App.js on second commit which is maybe a new function and have more commits afterwards and let's say I'm in 10th commit…
suchcodemuchwow
  • 848
  • 2
  • 9
  • 27
2
votes
0 answers

Can GitLens do a selected file checkout - cherry picking selected FILES to another commit?

My project failed to compile, so I unsuccessfully tried a variety of solutions over another 8 commits - including some changes I want to preserve. So my master has some files from a variety of commits that I want to pull over to my "Last Known Good"…
Vash Juan
  • 37
  • 8
1
vote
1 answer

How to access GitLens+ features for a public fork?

I created a public fork of a public repository on GitHub. After cloning via SSH I can't use the Commit Graph feature of the GitLens VSCode plugin. It says: A trial or paid plan is required to use this on privately hosted repos. Why is that? Which…
cppbest
  • 59
  • 8
1
vote
0 answers

Using GitLens in VSCode, how do I selectively reintroduce stashed changes

I'm using VSCode, I tried some changes that break the app. I stashed the changes and the app works OK. Now I want to reintroduce the changes one by one to get to the problem. When I open the stash in GitLens and select Open changes with working…
Francis
  • 702
  • 9
  • 21
1
vote
2 answers

Push to remote branch no longer working in VS Code with GitLens

For the past few days, I've been trying to push a branch to a private repo from VS Code with the GitLens extension, only to have it fail with the following cryptic message: [2022-12-02 21:00:41.637] Failed to execute git { "exitCode": 128, …
AckThpfft
  • 51
  • 4
1
vote
0 answers

How to disable ad from Gitlens and access functionality?

I've been a happy user of Gitlens for some time. But suddenly the activity button does not activate the usual functionality, instead it activates an ad. How can I get rid of this add and restore the functionality?
user1283776
  • 19,640
  • 49
  • 136
  • 276
1
vote
1 answer

GitLens unable to pull push in Visual Studio Code

I created a simple repository, edited an index.html file and published the changes to GitHub through Visual Studio Code GitLens. It works fine. On a subsequent commit, it throws an error: > git pull --tags origin main From…
Dennis
  • 67
  • 7
1
vote
1 answer

VSCODE Gitlens Undo Merge Manually

While merging manually using vscode-gitlens command --no-ff, I just notice i'm trying to merge SIT to my file and now it stucks at this stage where I cant undo the changes. Can anyone provide any solution on how to undo/revert? or I need to commit…
nkc
  • 11
  • 1
  • 3
1
vote
2 answers

Is there an option for storing "master code" using git?

While using git, we all have our code in our own repository, pushing to and pulling from a bare repository. If I need parts of the newest code in a specific folder for later use by an automated script, what would be the best way to get the code from…
DAHNNY
  • 21
  • 4
1
vote
0 answers

VSCode GitLens Extention stashes show untracked files

When looking at GitLens stashes, it shows a bunch of untracked files that looks as if they were included in the stash. However, only one file was actually stashed which is what shows when I run git stash show. Why is GitLens tracking all of these…
1
vote
2 answers

Gitlens hangs when fetching remote repository via WSL

I'm using Gitlens with VS Code via Git installed in WSL2. (I'm using Amazon Linux 2 as my distro). Performing a fetch in either the Remotes or Repositories view in Gitlens causes it to hang. It puts up a "Fetching" notification but never completes.…
Peter Swords
  • 489
  • 6
  • 17
1
vote
1 answer

Prevent VSCode from saving GIT commands in PowerShell history

My PowerShell history gets polluted with GIT commands from VSCode or its GitLens extension (not sure which one actually does it since GitLens moved to Source Control panel), such as git branch --delete. Any way to avoid it?
empty'void
  • 91
  • 1
  • 7
0
votes
0 answers

Git Lens Search by authors and search string

I am trying to search text in files committed by multiple users using UI in vscode. I tried using GitLens feature search commits but cannot search by multiple users. I can do the same in command line but I would like to do that via UI. e.g. to view…
AhmedRana
  • 486
  • 9
  • 22
0
votes
0 answers

VS Code GitLens path using or single backslashes

Ive reinstalled my PC (Windows) and now the following functionality that worked completely fine doesnt anymore: e.g. Deleting a branch with the gitlens plugin: have a local git branch in the currently active repository navigate to "Branches" tab of…
ButterBetzi
  • 51
  • 1
  • 1
  • 6
0
votes
0 answers

Gitlens hiding the current state of my file?

I was searching for some code in VSCode in a branch that another developer had made, but couldn't find it even though I have their branch and haven't made any changes. Then I noticed there was a little red triangle in VS Code where their changes…
Eric
  • 2,861
  • 6
  • 28
  • 59