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

Git alias doesn't do the same thing as the aliased command

I'm still relatively new to Git, so perhaps I'm doing something stupid, but I have a weird issue... I defined a stage alias for add --all, because I find it shorter and more self-explanatory: D:\MyProject [master +0 ~1 -1]> git config alias.stage…
Thomas Levesque
  • 286,951
  • 70
  • 623
  • 758
1
vote
1 answer

Steps to Install Git from source, install Post-Git from source, and then load up Posh in PowerShell?

The Pro Git Installing Git article says: If you can, it's generally useful to install Git from source... Phil Haack's blog post on Posh-Git says: Once you have Posh-Git loaded up, your PowerShell window lights up with extra... And the Posh-Git…
Shaun Luttin
  • 133,272
  • 81
  • 405
  • 467
1
vote
3 answers

git -add doesn't work with wildcards

I'm trying to add (edit: THE DELETE operation) of these files with the text "generated" in it, and it doesn't work. I'm using PowerShell. # deleted: Apica.WebPerformance.Web.Controllers/SharedController.generated.cs # deleted: …
imbageek
  • 609
  • 5
  • 18
0
votes
1 answer

get-childitem with -recurse causes -contains match to behave differently when comparing $GitStatus

Using posh-git in powershell I am able to list all the items in the working tree that have changed, by using the collection variable $GitStatus.Working, I can use this list in a where clause to filter a directory listing like so dir | where…
Tim Jarvis
  • 18,465
  • 9
  • 55
  • 92
0
votes
0 answers

git status prompt is not shown in PowerShell

function prompt { $time = Get-Date -Format "HH:mm" $location = (Get-Location -PSProvider FileSystem).Path $promptText = "[" $promptText += "$([char]27)[96m$time$([char]27)[0m " $promptText +=…
0
votes
1 answer

I use two GitHub accounts. How do I customize my posh-git or PowerShell so that it displays the currently logged in git username always?

If I set display_user:true inside my oh-my-posh theme json file (spaceship.omp.json), I can see my windows account name. I want to know If I can do the same for git username.
0
votes
1 answer

How to get the "Lambda" symbol in Cmder Powershell with posh-git AFTER the git info?

I installed cmder and I use it with Powershell and posh-git. posh-git puts the git info after the Lambda, and the cursor after the git info, without any spaces: How do I change this to have the Lambda appear AFTER the git info? I already played…
rabejens
  • 7,594
  • 11
  • 56
  • 104
0
votes
1 answer

Cannot identify the source of uncoded element in oh-my-posh prompt

I'm using oh-my-posh v3 in Windows Terminal. If I'm in a non-git directory, my prompt looks like this... but, in a git-enabled directory it looks like this... I've exported the theme's definition to json and, as you can see, I can't find anything…
Stuart Hemming
  • 1,553
  • 2
  • 21
  • 44
0
votes
1 answer

Git recommendations, cygwin, WSL, PowerShell posh-git Module

I'm quite new to using git, so I'm not very knowledgeable, but have some questions, specifically about using git on Windows. Do I have to use git from https://git-scm.com/downloads or can I use other implementations of git? Alternatively, there is…
YorSubs
  • 3,194
  • 7
  • 37
  • 60
0
votes
1 answer

Posh-Git throwing ssh error while trying to pull from origin

I'm unable to pull from origin when using posh-git module. Is there a way to configure my existing ssh keys location with posh-git to use them? The native git works fine. Error Details: C:\Git\MyRepo [master ≡] > git pull origin master Could…
Siva Dasari
  • 1,059
  • 2
  • 19
  • 40
0
votes
1 answer

Get the Size of a File on SFTP Server using Posh-SSH

I have a posh-ssh setup that seems to be working pretty well. I'm looking to get the size of a file. https://github.com/darkoperator/Posh-SSH/blob/master/docs/Get-SFTPContent.md I feel like I should be able to do something like…
Daniel Williams
  • 167
  • 1
  • 10
0
votes
2 answers

Can 'git clean' move files to trash / recycle bin?

I found git clean -xdf. And I like it, because it cleans up what may IDE created. Today I was asked by a coworker: Can git clean move files to recycle bin instead of deleting the files? I checked, git clean deleted some files in a test repository,…
Paebbels
  • 15,573
  • 13
  • 70
  • 139
0
votes
1 answer

Domain Appended automatically to username with HTTPS

I'm attempting to use git via posh-git and whenever the command prompts me for my username, when I attempt to input it it appends @mycompany.visualstudioonline.com to my username. My username is "first.last@mycompany.com" so it then appends the…
EricKitt
  • 39
  • 6
0
votes
1 answer

Get Git Shell to run command after starting

You can do start powershell -command ls to open PowerShell and get it to list files. I'm trying to do a similar thing with Git Shell. Currently I have %LOCALAPPDATA\GitHub\Github.appref-ms --open-shell -command ls which opens Git Shell, but…
binaryfunt
  • 6,401
  • 5
  • 37
  • 59
0
votes
2 answers

Combining PowerShell Prompt functions (e.g. ConsoleZ with posh-git)

This is my ConsoleZ powershell that I wanted to have a posh-git environment also, but doesn't work. This line of code is inside the Microsoft PowerShell profile Write-Host "Setting up GitHub Environment" . (Resolve-Path…
juscuizon
  • 51
  • 1
  • 9