Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 653 Bytes

git.md

File metadata and controls

26 lines (21 loc) · 653 Bytes

gitのメモ

gitの初期設定

  • githubのサイトに行き新規リポジトリを作成してURLをgetしてくる
echo "# xxx" >> README.md
git init
git add README.md
git commit -m "first commit"
git branch -M main
git remote add origin https://github.com/kaie3/xxx.git
git push -u origin main

コミットの仕方

git status #変更のあったファイルを確認
git diff #変更した箇所を確認
git add . #変更されているファイルを全て追加
git reset #追加したファイルをキャンセル
git commit -m "bug fixed" #コメント付きコミット
git push origin main #プッシュ