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

Git基礎

Last updated at Posted at 2019-10-22

Gitの利用方法

  • リモードリポジトリの作成
  • Gitディレクトリ
    • $ git init
    • $ ls -a.git ができていることを確認
  • リモートリポジトリの登録
    • $ git remote add 設定するリモートリポジトリ名 リモートリポジトリURL
  • 作業ディレクトリ内の全てのファイルをステージングエリアにステージング
    • $ git add ファイル名 指定したファイルをステージング
    • $ git add -all 全てのファイルをステージング
  • ローカルリポジトリにコミット(ステージングエリアのファイルをローカルリポジトリに登録)
    • $ git commit -m "コメント"
    • 最初のcommitでmasterブランチ(開発の本流)が作成される
      • $ git branch → *masterとなってることを確認
  • リモートリポジトリへプッシュ(ローカルリポジトリに登録された内容をリモートリポジトリに登録)
    • $ git push リモートリポジトリ名 リモートブランチ名

参考文献

https://git-scm.com/book/ja/v2
http://programmerbox.com/2013-07-17_git_summary/https://note.mu/koushikagawa/n/n56d158125ee9

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?