LoginSignup
0
0

More than 5 years have passed since last update.

Windows7にscoopでgitをインストールした時のメモ

Posted at

Windows7にscoopでgitをインストールしたので忘れないようにメモする。

PowerShellの起動、更新

powershellを起動する
(スタートメニューの"プログラムとファイルの検索"に"powershell"を入力する)

バージョンを確認する
$PSVersionTable

バージョンが2.0の場合、Windows Management Framework を 3.0にアップデートする
https://docs.microsoft.com/ja-jp/skypeforbusiness/set-up-your-computer-for-windows-powershell/download-and-install-windows-powershell-3-0

Windows Management Framework 3.0 のダウンロード先
https://www.microsoft.com/en-us/download/details.aspx?id=34595
インストールした場合は再起動が必要

Scoopのインストール

Scoopをインストールする
Set-ExecutionPolicy RemoteSigned -scope CurrentUser
iex (new-object net.webclient).downloadstring('https://get.scoop.sh')

gitのインストール

gitをインストールする
scoop install git

参考にしたサイト

Scoop と PackageManagement を使った Windows 環境の構築
https://qiita.com/kikuchi_kentaro/items/77793e4a21db6ffdb7cd

おまけ(gitの動作確認)

git用ディレクトリへ移動する
cd C:\xampp\htdocs

git cloneでリポジトリを取得(初期設定)する
git clone https://github.com/uneri/calendar.git
※cloneしたいURLを入力する

取得したディレクトリに移動する
cd calendar

・・なにか変更する・・

gitのコミット用の値を設定する(gitのユーザーでなくてもよい)
git config --list
git config --local user.email "xxxxx@xxxx"
git config --local user.name "xxxx"

ローカルリポジトリへの追加
git add *
git commit -m "xxxx(コメント)"

リモートリポジトリへの追加
git remote -v
git push origin master
※ユーザー・パスワードのポップアップ画面が表示されます。

反映されたことの確認
git log

取り消す場合
git reset --hard xxxxx
git push -f

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0