Clearing the cached credentials from Credential Manager. And then try again.Go to Credential Manager–> Windows Credentials–> Generic Credentials–>Remove all Git related credentials.
Category: GIT
GIT – How to prune local tracking branches that do not exist on remote anymore
One-liner, cross platform, doesn’t look like the cat slept on your keyboard:
npx git-removed-branches
(dry-run) or
npx git-removed-branches --prune
(removes for real).
You need to already have node.js installed.
Source: git – How to prune local tracking branches that do not exist on remote anymore – Stack Overflow
Add above as external command in Visual Studio 2022 “Tools” menu:
Clean up your local branches after merge and delete with git
On undoing, fixing, or removing commits in git
This document is an attempt to be a fairly comprehensive guide to recovering from what you did not mean to do when using git. It isn’t that git is so complicated that you need a large document to take care of your particular problem, it is more that the set of things that you might have done is so large that different techniques are needed depending on exactly what you have done and what you want to have happen.
Setup private SSH key for WebStorm and other IDEs in Windows
I had a problem pushing commits to Bitbucket inside Webstorm “no access” or similar error when trying to push.
I usually use Sourcetree together with Putty Pageant loaded with the putty specific SSH file format ppk. So the solution was to convert the private putty ppk file into OpenSSH file format using PuTTygen.
Then save that file into %userprofile%\.ssh\id_rsa
(id_rsa is the open ssh file name, no extension).
It made it possible for Webstorm to push to Bitbucket.
Follow these steps to convert from ppk to OpenSSH:
- Run the puTTygen program.
- Click Load.
- Select your private key that ends in .ppk and then click Open.
- Click the Conversions menu option.
- Click Export OpenSSH key.
How to set aliases in Git Bash for Windows?
For Windows 10 with Git Bash:
Edit file “%userprofile%\.bashrc”
Using Notepad++ or other text editor in Administrator mode.
Add another alias line beneath the present alias lines:
alias ls='ls --color=auto --show-control-chars -a -p --time-style=long-iso -h -X --group-directories-first' alias ll='ls -l --color=auto --show-control-chars -a -p --time-style=long-iso -h -X --group-directories-first' alias ngs='ng serve --open' alias grep='grep -i -n --color=always' alias log='git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%C(bold blue) <%an> %Creset' --abbrev-commit'
Above is an alias ngs for serving angular development server and open a web browser.
Instead of typing “ng serve –open” in Git bash window you should now be able to just use ngs as an shortcut alias.
Solved: Sourcetree GIT Client has stopped showing “new” files
There is a dropdown above the file list. If you switched it to “Modified” instead of “Pending”, it would only show tracked files that had changes.
Bitbucket Set up an SSH key on Sourcetree for Windows – Atlassian Documentation
Goto heading “Set up SSH with Sourcetree on Windows”‘
Source: Set up an SSH key – Atlassian Documentation
Also see this fix for getting PuTTY Pageant working with Visual Studio 2017 built-in GIT:
I finally managed to make it work, using PuTTY’s Pageant authentication agent instead of ssh-agent
, and following the steps mentioned here (it’s for Visual Studio Code, but works for Visual Studio 2017 and I guess it should work for any application that uses the “official” Git for Windows).
Since I already had Pageant installed and a .ppk private key created, I only had to make Git use Pageant, by creating the GIT_SSH
Windows environment variable and setting it to the path of the “plink.exe” file (inside the PuTTY installation, for example C:\Program Files (x86)\PuTTY\plink.exe
). With that done, I just need to open Pageant and add the private key (and leave it open while working with the repository), and Visual Studio will be able to connect and issue commands just fine.
From: https://stackoverflow.com/questions/42773636/connect-to-git-repository-with-ssh-using-visual-studio-2017#
Set up an SSH key on Bitbucket with Sourcetree GIT client – Atlassian Documentation
Set up SSH with Sourcetree on Windows
git – How to move branch in SourceTree into Folder?
E.g rename the branch mybranch to feature/mybranch will make it appear under the folder feature in Sourcetree.
Source: git – How to move branch in SourceTree into Folder? – Stack Overflow