1
0

【GitHub】Gitコマンド初心者の備忘録

Last updated at Posted at 2021-10-31

概要

普段はTortoiseGitユーザーで、Gitコマンドがさっぱり覚えられないので備忘録として残しておきます。
本当に基礎的なところのみ。。。。

リポジトリ作成

GitHub公式から右上の緑色ボタンをポチっとして、リポジトリ名を入力。
ここからは自由だが、ReadMeにチェック。

クローン

bash
git clone {URL}

ステータス確認

bash
git status

ファイル構成変更

bash
git mv {変更前パス} {変更後パス}

ユーザ名確認・変更

bash
git config --global user.name
git config --global user.name {ユーザ名}

ファイル追加

bash
git add {ファイルパス}

コミット

bash
git commit -m {メッセージ}

プッシュ

bash
git push

削除

反映させるには、削除後にコミットとプッシュが必要。

bash
git rm {ファイルパス}

トークン取得

コミット時に聞かれるパスワード認証はサポート終了のため、トークンをいちいち取得しなければならなくなった。

トークン取得方法は公式を参照

1
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
1
0