1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Githubコマンド 一覧

Posted at

githubコマンド一覧

Qiitaの練習と、自分用メモを兼ねてgithubコマンド一覧を作成

  • git init  カレントディレクトリをGitで管理できるようになる
  • git status ワークツリーとインデックスの現在の状態を確認
  • git add ファイルをインデックスに追加
  • git commit インデックスに登録されたのをローカルリポジトリにコミット。-mをつけることで一文のメッセージを付けれる。何もなしだと文章
  • git diff 現在のインデックスとワークツリーの差分確認
  • git log コミットの履歴確認
  • git reset [識別番号] 前に戻す git reset HEAD^で1つ前に。
  • git push origin [branchname] リモートリポジトリへ反映
  • git branch [name] [name]にブランチの名前を指定してブランチを作成(何も指定しないとブランチの一覧を表示できる。*←これが左についているところが現在のブランチ
  • git checkout [name]  [name]にブランチの名前を指定することでブランチを切り替えられる。

ブランチ

履歴を分岐して記録できるようになる。そうすることで他のブランチの影響を受けないので、同時に複数の変更を進められる。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?