0
0

More than 3 years have passed since last update.

Git使うコマンドメモ~開始参考サイト付き

Posted at

メモです

よく使うメモ増えたら追記します

プッシュしたいファイルがあるフォルダに移動

$ cd C:/Users/< User >/Documents/Python/

  • Windowsの\ではなく/

$ git init

リモートでつなぐオリジンを設定

$ git remote add origin <URL>

  • 連続で入力するとエラー起こすのでオリジン消去
  • $ git remote rm origin

ファイルをGitにあげる(コミット・プッシュ)

$ git add test.py
$ git commit -m "Create test.py"
$ git push origin master

ちなみにログインせずにコミットすると

$ git commit -m "Create index.html"

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got '******')

と出る

参考(コマンド)

https://prog-8.com/docs/git-env-win
https://qiita.com/opengl-8080/items/451c5967cbbc262f4f0d

参考(ssh接続)

https://qiita.com/0ta2/items/25c27d447378b13a1ac3
https://qiita.com/hollyhock0518/items/a3fee20951cd92c87ed9

  1. ~/.sshディレクトリに作成すると場所はC:\Users\< User >\.sshにできる
  2. git で作成してアップロード

GitHub

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