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

73 questions
73
votes
5 answers

Changing "git status" output colors in Posh-Git

In Posh-Git, when I run "git status" in a repository, the colors for changes and untracked files are dark red, when I have tried to configure them to be "normal" red. I want to do this because I have a console with a dark background, so dark red is…
NightShovel
  • 2,614
  • 1
  • 25
  • 34
52
votes
4 answers

How do I create a master branch in a bare Git repository?

(All done in poshgit on Windows 8): git init --bare test-repo.git cd test-repo.git (Folder is created with git-ish files and folders inside) git status fatal: This operation must be run in a work tree (Okay, so I can't use git status with a bare…
David
  • 14,678
  • 20
  • 80
  • 145
23
votes
3 answers

The term 'Install-Module' is not recognized as the name of a cmdlet

I am following the directions to install poshgit. In doing so I ran: Install-Module posh-git Error: The term 'Install-Module' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or…
P.Brian.Mackey
  • 39,360
  • 59
  • 210
  • 327
23
votes
3 answers

How to use posh-git that comes with GitHub for Windows from custom shell?

Installing GitHub for Windows is a nice way to get at once beginner's git Windows app, msysgit and posh-git - but you can only start the git shell with posh-git by calling "GitHub.appref-ms --open-shell". What I want to do, is to start a console,…
Sergey Aldoukhov
  • 20,978
  • 14
  • 68
  • 98
20
votes
1 answer

What do the colors in the Github for Windows shell mean?

When "gitting" in Windows, I happily use the Github for Windows client, but since I do a lot of work in Linux as well I often end up in the shell when anything more complicated than committing or syncing has to be done. I really like the Posh-Git…
Tomas Aschan
  • 53,075
  • 51
  • 214
  • 362
10
votes
2 answers

git stash apply unknown option: -encodedCommand error

When applying a git stash with the command: git stash apply stash@{1} As suggested in the documentation on git stash. I receive the error: unknown option: -encodedCommand error
Alex KeySmith
  • 15,289
  • 6
  • 63
  • 143
10
votes
1 answer

Why no yellow in powershell and posh git

Ok, so in git bash this cmd.. git log --pretty='%C(yellow)%h%Creset %s' --abbrev-commit gives me a yellow commit id and white subject line, but in powershell (with posh git) I get no yellow commit id (it's the default white). Why ?
Tim Jarvis
  • 17,081
  • 9
  • 52
  • 91
9
votes
3 answers

How to update posh-git

I have an old version of posh-git that I want to update (while trying to solve slow powershell start ups) I've pulls latest from the repo and when I am trying to do .\install.ps1 I get It seems posh-git is already installed... How do I update…
Nick Ginanto
  • 26,414
  • 39
  • 123
  • 214
9
votes
2 answers

Powershell asking for git RSA passphrase on every pull instead of on startup?

I've installed PoshGit and I've set up my RSA key with github and in my ~\.ssh folder, but PowerShell still prompts me to enter a passphrase on every pull/push. I've followed all the instructions given here. My powershell profile looks like…
Caleb Jares
  • 5,632
  • 6
  • 49
  • 80
9
votes
2 answers

find all git commits for a file type

its pretty simple to find all the commits containing a particular file. git log -- .\Database\Tables\sometable.sql but is there a simple way to find all the commits for a file type (recursively down child directories?) or will I need to write a…
Tim Jarvis
  • 17,081
  • 9
  • 52
  • 91
8
votes
2 answers

Why is git slow on my windows machine?

Just typing git at the command prompt (of powershell), takes 2.5 seconds until it returns with the help message. I'm using the git for windows release, installed in C:\Program Files (x86)\Git. When I use cygwin (via babun), I get an error: Hint:…
IttayD
  • 25,561
  • 25
  • 109
  • 173
8
votes
3 answers

How to add powershell autocomplete like POSH Git

I'm using POSH git for powershell and can do for example git checkout mini and I get git checkout minidisk I'd like to create a alias gco for git checkout to do gco mini to get gco minidisk Is it possible to forward the tab completion…
bradgonesurfing
  • 28,325
  • 12
  • 101
  • 188
8
votes
1 answer

Why do I need to run `ssh-add` in my Powershell profile?

In my Microsoft.PowerShell_profile.ps1 document, I've had to add ssh-add ~/.ssh/github_rsa following the poshgit examples in order for it to connect to my GitHub repos. # Load posh-git example profile .…
Chase Florell
  • 42,985
  • 56
  • 169
  • 364
5
votes
3 answers

Oh-my-posh themes not working correctly with Powerline font and ConEmu

I use PowerShell as my shell on Windows 7. I find that ConEmu is a really good terminal. Since I am not on Windows 10, I cannot use Windows Terminal but ConEmu is not bad at all. I found out about posh-git and oh-my-posh and how they can customize…
Arafat Khan
  • 508
  • 1
  • 5
  • 19
5
votes
3 answers

git blame throws a bad revision error with the -L option

One of the git blame options processes a line range. The manual says: -L Process only line range n,m, counting from 1 Now, I have a file that has over 100 lines. When I run git blame -L 5,15 myFile.txt, git complains: fatal: bad revision…
Shaun Luttin
  • 107,550
  • 65
  • 332
  • 414
1
2 3 4 5