「Windows/powershell/posh-git」の版間の差分
提供: 初心者エンジニアの簡易メモ
| (同じ利用者による、間の5版が非表示) | |||
| 行2: | 行2: | ||
powershellでgitを簡単に使えるもの | powershellでgitを簡単に使えるもの | ||
| − | == | + | ==posh-gitインストール== |
| + | |||
| + | macの場合は一度以下を実行してpowershellに入る | ||
| + | /usr/local/bin/pwsh | ||
| + | |||
powerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force | powerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force | ||
| − | + | ||
| + | アップデートの場合は以下 | ||
PowerShellGet\Install-Module posh-git -Scope CurrentUser | PowerShellGet\Install-Module posh-git -Scope CurrentUser | ||
| + | |||
| + | ==posh-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 | ||
| + | |||
| + | ==参考== | ||
| + | https://qiita.com/kerobot/items/78372640127771f92ee0 | ||
2021年9月2日 (木) 00:29時点における最新版
posh-gitとは
powershellでgitを簡単に使えるもの
posh-gitインストール
macの場合は一度以下を実行してpowershellに入る
/usr/local/bin/pwsh
powerShellGet\Install-Module posh-git -Scope CurrentUser -AllowPrerelease -Force
アップデートの場合は以下
PowerShellGet\Install-Module posh-git -Scope CurrentUser
posh-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
