Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using git on windows powershell

Tags:

git

powershell

I'm trying to use git on powershell, but having trouble. I was following Miguel Grinberg pycon workshop, and he clones with git clone " " I know I can download git, and can be done with git bash. but I want to do the command on windows powershell. Can it be done outside of gitbash?


2 Answers

If you download and install the git client for Windows, it will work in powershell.

https://git-scm.com/download/win

For example:

PS C:\Users\joeyoung> git --version
git version 1.9.5.msysgit.1
PS C:\Users\joeyoung> git clone https://github.com/miguelgrinberg/flask-pycon2015.git
Cloning into 'flask-pycon2015'...
remote: Counting objects: 70, done.
remote: Total 70 (delta 0), reused 0 (delta 0), pack-reused 70
Unpacking objects: 100% (70/70), done.
Checking connectivity... done.
PS C:\Users\joeyoung> dir .\flask-pycon2015


    Directory: C:\Users\joeyoung\flask-pycon2015


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        31/08/2015     10:56            templates
-a---        31/08/2015     10:56        675 .gitignore
-a---        31/08/2015     10:56       3735 app.py
-a---        31/08/2015     10:56       3629 guess.py
-a---        31/08/2015     10:56       1083 LICENSE
-a---        31/08/2015     10:56         99 README.md
-a---        31/08/2015     10:56        112 requirements.txt


PS C:\Users\joeyoung>
like image 140
Joe Young Avatar answered Apr 22 '26 18:04

Joe Young


If you downloaded git from https://git-scm.com/download/win, then you could choose whether to modify PATH when you installed it:

Git Setup

If you chose "Use Git from Git Bash only", you will not be able to use it in the powershell, unless you add X:\path-to-git-installation\cmd to your PATH manually.

Otherwise, you should have no trouble using git in powershell.

like image 34
Thomas Lee Avatar answered Apr 22 '26 18:04

Thomas Lee



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!