LoginSignup
0
0

More than 3 years have passed since last update.

git初心者がgitを使いこなすためのメモ

Posted at

(1)初期設定

git config --global user.name "名前を入れる"
git config --global user.email メールアドレスを入れる

(2)gitリポジトリを作成する

リポジトリを作成したいディレクトリに移動して、下記コマンドを実行。

git init

・リポジトリ:ファイルやディレクトリの状態、変更履歴を記録する場所。

(3)gitの基本的なワークフロー

①ファイルの変更をステージングエリアに追加する

git add ファイル名     ←入力したファイルを追加
git add .          ←すべてのファイルの変更を追加
git rm ファイル名          ←削除したファイルを記録

②ローカルリポジトリにコミットする

git commit -m "コメントする"

③リモートリポジトリにプッシュする

まずリモートリポジトリに登録する

git remote add origin 登録gitのURL
git push origin master
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