Questions tagged [posh-git]

A PowerShell environment for Git, providing prompt status, tab expansion, and helpful functions.

posh-git is PowerShell module that provides support for Git similar to what is provided by default with Git Bash. Details at https://github.com/dahlbyk/posh-git

83 questions
1
vote
1 answer

Using powershell to move sub-folder contents up one level; different parent folders

I've looked through various questions on SO but can't get the script to work. New to Powershell and I'm sure this easy - any help would be great I have a directory structure of 170 folders: G:\Data\ folder1\ …
1
vote
1 answer

posh-git - Start-SshAgent not recognized on new computer

I've set up a brand new computer with PowerShell 7 and posh-git. When trying to run profile.ps1 on startup the Start-SshAgent command fails, resulting in cmdlet not recognized. Import-Module posh-git works fine, I see the command line prompt…
DavGarcia
  • 18,540
  • 14
  • 58
  • 96
1
vote
3 answers

How to remove red base glyph from my oh-my-posh/posh-git display?

I'm using windows terminal v1.0.1402.0 with powershell v7.0.1 with oh-my-posh and posh-git. I'm currently getting the following red base glyph when I open up my terminal. I've installed and tried using MesloLGL NF and Cascadia Mono PL for the…
avenmia
  • 2,015
  • 4
  • 25
  • 49
1
vote
1 answer

Cloning an Azure repo in Azure Runbooks

As a part of this automation thing I am doing, I am required to clone a repo as it has a json file that I will need to use for automation. I have imported posh-git but I am unable to run git clone in it. Here is the error: git : The term 'git'…
Anonymous Person
  • 1,437
  • 8
  • 26
  • 47
1
vote
2 answers

Where do I update environment variables for git bash on Windows

I'm setting up specific configuration combination consisting of Git + Gpg4Win + Powershell + Posh-git All set up except git environment variables refer to git's version of ssh-agent so Posh-git is unable to auto start ssh-agent. (I need this so it…
metablaster
  • 1,958
  • 12
  • 26
1
vote
2 answers

How do I add autocomplete to git aliases?

I have setup git autocomplete using the git-autocomplete.bash file which works for standard commands and simple aliases (co = checkout), but I have a longer alias defined in my .git-config file that I would like to autocomplete branch names on and I…
Braydie
  • 716
  • 9
  • 27
1
vote
2 answers

Why does my Posh-Git prompt keep disappearing?

I've always used Phil Haack's method of installing Posh-Git, with the following PowerShell commands: (new-object Net.WebClient).DownloadString("http://psget.net/GetPsGet.ps1") | iex install-module posh-git The first line installs PsGet, and the…
ProfK
  • 49,207
  • 121
  • 399
  • 775
1
vote
2 answers

How to reload PowerShell after installing poshgit from script?

I'm having troubles to find a way to get git and poshgit working after installing it through a script using chocolatey without closing the powershell console. Here is what my script currently looks like. Function InstallChocolatey { iwr…
Pascal Mages
  • 177
  • 1
  • 11
1
vote
0 answers

posh-git not working with Pycharm: "bash: __git_ps1: command not found"

I have been using the same bash_profile for years with terminal, which includes posh-git. https://github.com/lyze/posh-git-sh However, when I started using Pycharm, the editor's terminal doesn't render my posh-git, but instead gives me the…
Jameela Huq
  • 169
  • 9
1
vote
1 answer

Remove Powershell error on startup

I tried to install Posh-Git to use ssh with Powershell. I followed the instructions here The file here was not digitally signed so I changed the Execution Policy to install it. I then (for whatever reason) decided not to use this so I removed the…
GreenyMcDuff
  • 3,292
  • 7
  • 34
  • 66
1
vote
2 answers

How to cache credentials for VS online in posh-git?

I use Visual Studio online with git and PowerShell (posh-git). I setup alternate credential in my VS profile so I have username/password. Whenever I issue git pull in posh-git I have to enter my credentials - it is quite annoying. Can I cache it…
eXavier
  • 4,821
  • 4
  • 35
  • 57
1
vote
1 answer

Add content of all directories that have a specified name

For instance, we want to add the contents of all Media directories that Git has been told to ignore. The directories are scattered throughout our project. Running git add -A -f isn't a solution, because it adds everything. An alternative is to add…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
1
vote
1 answer

PoshGit in powershell ise

I have poshgit working fine from the powershell console but when I'm trying to use it within the ise it doesn't work. At least when I'm trying to fetch it doesn't prompt me to enter the username (I'm not using the winstore or similar) and just…
mitomed
  • 2,006
  • 2
  • 29
  • 58
1
vote
2 answers

Posh Git Won't Show Status or Colors on Prompt

I'm on Windows 7, installed git and then posh-git (to run git from powershell), no errors. I'm able to enter git commands like 'git init' and 'git status' now from the powershell, and posh-git's tab completion works in my powershell, so I believe…
Max Power
  • 8,265
  • 13
  • 50
  • 91
1
vote
1 answer

posh-git shows long branch-name

I love git in my windows pwershell using posh-git. For a long time my shell used to look like this: D:\repos\project [master]> But now I updated from git 1.8.x to 1.9.4.msysgit.0 and the output changed: D:\repos\project [master...origin/master]>…
tjati
  • 5,761
  • 4
  • 41
  • 56