0

I tried this and it doesn't show any output. What is the right way to do this?

invoke-expression 'git status'
1
  • 1
    you only need to be on the git directory something like C:\path\to\git_repositories\git_repo_1>git status Commented Aug 8, 2017 at 18:27

1 Answer 1

1
  1. Install-Module posh-git -Scope AllUsers

  2. Import-Module posh-git

  3. CD in Powershell to any cloned Git repo folder and the prompt itself gives you the full status

More info:

 https://github.com/dahlbyk/posh-git

Otherwise, you can always fall back on the standard Git shell with a "git status" but issuing an invoke-expression etc. in PS for the non-PS CIM is certainly not the most efficient way to work with Git locally in PS.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.