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?

Gitの勉強①

Posted at

備忘録

今日学んだこと

3つの作業場所

1.ワーキングツリー
2.インデックスエリア
3.ローカルリポジトリ

違いや概念についてはあまり理解できていないので,うまく言語化できるようになったらもう一度記事にします.

コマンド

mkdir ディレクトリ名

ディレクトリを作成する.ディレクトリとは,データをまとめておくフォルダ.厳密には違うかもしれない...

git init

現在のディレクトリをリポジトリとして登録.リポジトリとは,ファイルやディレクトリをまとめておくもの.

git add ファイル名

ファイルをワーキングツリーからステージングエリア(インデックスエリア)に登録する.ステージングエリアに登録することをステージングという.

touch ファイル名

現在のディレクトリ内にファイルを作成する.

git branch

現在のブランチを確認する.ブランチとは,リポジトリの開発経路.通常は複数のブランチを作成して,パラレルに開発を進めていく.

git branch ブランチ名

ブランチを作成する

git switch ブランチ名

ブランチを移動する.

git commit

インデックスエリアにあるファイルをローカルリポジトリに登録する.

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?