「Windows/powershell/posh-git」の版間の差分
提供: 初心者エンジニアの簡易メモ
(→post-get読み込み) |
|||
| 行14: | 行14: | ||
==post-get読み込み== | ==post-get読み込み== | ||
Import-Module posh-git | Import-Module posh-git | ||
| + | |||
| + | ==git操作== | ||
| + | 以後は普通に以下通常gitコマンドを扱える | ||
| + | |||
| + | git clone ttps://example.com/hoge.git | ||
| + | git pull origin master | ||
| + | git checkout | ||
| + | git branch | ||
| + | git branch -A | ||
| + | git commit -m "hoge1" | ||
| + | git push origin master | ||
==参考== | ==参考== | ||
https://qiita.com/kerobot/items/78372640127771f92ee0 | https://qiita.com/kerobot/items/78372640127771f92ee0 | ||
2021年8月18日 (水) 19:43時点における版
posh-gitとは
powershellでgitを簡単に使えるもの
post-gitインストール
macの場合は一度以下を実行してpowershellに入る
/usr/local/bin/pwsh
powerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
アップデートの場合は以下
PowerShellGet\Install-Module posh-git -Scope CurrentUser
post-get読み込み
Import-Module posh-git
git操作
以後は普通に以下通常gitコマンドを扱える
git clone ttps://example.com/hoge.git git pull origin master git checkout git branch git branch -A git commit -m "hoge1" git push origin master
