SlideShare a Scribd company logo
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 1/30
Git⼊⾨
1 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 2/30
対象者
git未経験者
基本的なコマンド操作可能
2 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 3/30
⽬標
基本的なgitコマンド操作ができるようになる
githubの操作ができるようになる
3 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 4/30
Gitとは
変更履歴を記録・追跡するためのバージョン管理シス
テム
ローカル環境で操作
差分ではなくスナップショット
4 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 5/30
リポジトリ
ファイルやディレクトリの状態を記録する場所。リモー
トリポジトリとローカルリポジトリがある
5 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 6/30
ブランチ
履歴の流れを分岐して記録していくためのもの
6 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 7/30
インストール
公式サイト(https://git-scm.com)よりダウンロード
7 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 8/30
インストール
インストール完了後、gitコマンドが使⽤可能になる
# バージョン確認
$ git version
git version 2.19.1.windows.1
# ヘルプ表⽰
$ git --help
8 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 9/30
gitコマンド
ローカル編
9 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 10/30
覚えるべきgitコマンド
git init
git add
git commit
10 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 11/30
空のgitリポジトリを作成
$ mkdir sample
$ cd sample
$ git init
git init
11 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 12/30
git add
ファイルをバージョン管理対象として追加する
$ echo sample > sample.txt
$ git add sample.txt
全ファイルを追加したい場合
$ git add .
12 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 13/30
git commit
変更内容をリポジトリに追加する
$ git commit -m "comment"
13 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 14/30
githubの利⽤
14 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 15/30
アカウント作成
https://github.com/
15 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 16/30
リポジトリの作成
https://github.com/new
16 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 17/30
リポジトリの作成
作成したリポジトリのパスをコピー
17 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 18/30
gitコマンド
リモート編
18 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 19/30
覚えるべきgitコマンド
git remote
git push
git pull
git clone
19 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 20/30
git remote
リモートリポジトリの操作を⾏う
# リモートリポジトリを追加
$ git remote add origin [リポジトリのパス]
# 登録されているリモートリポジトリの確認
$ git remote -v
origin https://github.com/Kyohei-M/sample.git (fetch)
origin https://github.com/Kyohei-M/sample.git (push)
20 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 21/30
git push
リモートリポジトリにコミットをプッシュする
$ git push origin master
21 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 22/30
git pull
リモートリポジトリと同期する
$ git pull origin master
22 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 23/30
git clone
リポジトリをローカルに複製する
$ git clone [リモートリポジトリのパス]
23 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 24/30
注意点
24 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 25/30
githubとsshキー
githubの操作には、ローカルマシンのsshキーを設定する
必要がある
25 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 26/30
sshキーの作成
https://confluence.atlassian.com/bitbucketserver/creating-ssh-keys-
776639788.html
$ ssh-keygen -t rsa -C "your_email@example.com"
作成される".sshid_rsa.pub"の中⾝をgithubにコピー
26 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 27/30
おまけ
27 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 28/30
Sourcetree
GitのGUIツール。使いやすいらしい(使ったことない)
https://www.sourcetreeapp.com/
28 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 29/30
皆さん、Gitを使いましょう︕
29 / 30
2019/3/28 Git⼊⾨
127.0.0.1:5500/index.html#8 30/30
参考
公式サイト
https://git-scm.com/
Wikipedia
https://ja.wikipedia.org/wiki/Git
サルでもわかるGit⼊⾨
https://backlog.com/ja/git-tutorial/
30 / 30

More Related Content

Similar to Git入門

Git社内勉強会資料
Git社内勉強会資料Git社内勉強会資料
Git社内勉強会資料Kenji Takei
 
15分でわかるGit入門
15分でわかるGit入門15分でわかるGit入門
15分でわかるGit入門to_ueda
 
Git道場を開催してきた
Git道場を開催してきたGit道場を開催してきた
Git道場を開催してきたHiromu Shioya
 
Git講習会
Git講習会Git講習会
Git講習会galluda
 
Githubことはじめ
GithubことはじめGithubことはじめ
Githubことはじめtikitikipoo
 
Gitとちょっと仲良くなるために覚えたことまとめ
Gitとちょっと仲良くなるために覚えたことまとめGitとちょっと仲良くなるために覚えたことまとめ
Gitとちょっと仲良くなるために覚えたことまとめNatsumi Kashiwa
 
バージョン管理システムチュートリアル
バージョン管理システムチュートリアルバージョン管理システムチュートリアル
バージョン管理システムチュートリアルRyo Igarashi
 
Git 入門
Git 入門Git 入門
Git 入門y-uti
 
Gitを理解するためにおさえておきたい3つの図(工事中)
Gitを理解するためにおさえておきたい3つの図(工事中)Gitを理解するためにおさえておきたい3つの図(工事中)
Gitを理解するためにおさえておきたい3つの図(工事中)Teloo
 
@s_ssk13さん向けGitHub入門
@s_ssk13さん向けGitHub入門@s_ssk13さん向けGitHub入門
@s_ssk13さん向けGitHub入門Takashi Imagire
 
Git勉強会資料
Git勉強会資料Git勉強会資料
Git勉強会資料Kenji Takei
 
WindowsでGitを使う際のベストプラクティス
WindowsでGitを使う際のベストプラクティスWindowsでGitを使う際のベストプラクティス
WindowsでGitを使う際のベストプラクティスRyo Sumasu
 
超初心者のためのGitマニュアル
超初心者のためのGitマニュアル超初心者のためのGitマニュアル
超初心者のためのGitマニュアルMasakiKato14
 
Gitの便利ワザ
Gitの便利ワザGitの便利ワザ
Gitの便利ワザktateish
 

Similar to Git入門 (20)

Git社内勉強会資料
Git社内勉強会資料Git社内勉強会資料
Git社内勉強会資料
 
15分でわかるGit入門
15分でわかるGit入門15分でわかるGit入門
15分でわかるGit入門
 
Git&GitHub入門
Git&GitHub入門Git&GitHub入門
Git&GitHub入門
 
Gitの紹介
Gitの紹介Gitの紹介
Gitの紹介
 
Git 勉強会
Git 勉強会Git 勉強会
Git 勉強会
 
Git地図
Git地図Git地図
Git地図
 
Git道場を開催してきた
Git道場を開催してきたGit道場を開催してきた
Git道場を開催してきた
 
Bitbucket and git
Bitbucket and gitBitbucket and git
Bitbucket and git
 
Git講習会
Git講習会Git講習会
Git講習会
 
Githubことはじめ
GithubことはじめGithubことはじめ
Githubことはじめ
 
Gitとちょっと仲良くなるために覚えたことまとめ
Gitとちょっと仲良くなるために覚えたことまとめGitとちょっと仲良くなるために覚えたことまとめ
Gitとちょっと仲良くなるために覚えたことまとめ
 
バージョン管理システムチュートリアル
バージョン管理システムチュートリアルバージョン管理システムチュートリアル
バージョン管理システムチュートリアル
 
Git 入門
Git 入門Git 入門
Git 入門
 
Gitを理解するためにおさえておきたい3つの図(工事中)
Gitを理解するためにおさえておきたい3つの図(工事中)Gitを理解するためにおさえておきたい3つの図(工事中)
Gitを理解するためにおさえておきたい3つの図(工事中)
 
Git 20100313
Git 20100313Git 20100313
Git 20100313
 
@s_ssk13さん向けGitHub入門
@s_ssk13さん向けGitHub入門@s_ssk13さん向けGitHub入門
@s_ssk13さん向けGitHub入門
 
Git勉強会資料
Git勉強会資料Git勉強会資料
Git勉強会資料
 
WindowsでGitを使う際のベストプラクティス
WindowsでGitを使う際のベストプラクティスWindowsでGitを使う際のベストプラクティス
WindowsでGitを使う際のベストプラクティス
 
超初心者のためのGitマニュアル
超初心者のためのGitマニュアル超初心者のためのGitマニュアル
超初心者のためのGitマニュアル
 
Gitの便利ワザ
Gitの便利ワザGitの便利ワザ
Gitの便利ワザ
 

More from Kyohei Mizumoto

Introduction to telepresence
Introduction to telepresenceIntroduction to telepresence
Introduction to telepresenceKyohei Mizumoto
 
Windowsコンテナ入門
Windowsコンテナ入門Windowsコンテナ入門
Windowsコンテナ入門Kyohei Mizumoto
 
Introduction of cloud native CI/CD on kubernetes
Introduction of cloud native CI/CD on kubernetesIntroduction of cloud native CI/CD on kubernetes
Introduction of cloud native CI/CD on kubernetesKyohei Mizumoto
 
Deploy Mattermost on AKS
Deploy Mattermost on AKSDeploy Mattermost on AKS
Deploy Mattermost on AKSKyohei Mizumoto
 
Running k3s on raspberry pi
Running k3s on raspberry piRunning k3s on raspberry pi
Running k3s on raspberry piKyohei Mizumoto
 
Kubernetes logging introduction
Kubernetes logging introductionKubernetes logging introduction
Kubernetes logging introductionKyohei Mizumoto
 
Kubernetes monitoring introduction
Kubernetes monitoring introductionKubernetes monitoring introduction
Kubernetes monitoring introductionKyohei Mizumoto
 
Istio service mesh introduction
Istio service mesh introductionIstio service mesh introduction
Istio service mesh introductionKyohei Mizumoto
 
Multi cluster management with rancher
Multi cluster management with rancherMulti cluster management with rancher
Multi cluster management with rancherKyohei Mizumoto
 

More from Kyohei Mizumoto (10)

Introduction to telepresence
Introduction to telepresenceIntroduction to telepresence
Introduction to telepresence
 
Windowsコンテナ入門
Windowsコンテナ入門Windowsコンテナ入門
Windowsコンテナ入門
 
Introduction of cloud native CI/CD on kubernetes
Introduction of cloud native CI/CD on kubernetesIntroduction of cloud native CI/CD on kubernetes
Introduction of cloud native CI/CD on kubernetes
 
Deploy Mattermost on AKS
Deploy Mattermost on AKSDeploy Mattermost on AKS
Deploy Mattermost on AKS
 
Recap of de code 2019
Recap of de code 2019Recap of de code 2019
Recap of de code 2019
 
Running k3s on raspberry pi
Running k3s on raspberry piRunning k3s on raspberry pi
Running k3s on raspberry pi
 
Kubernetes logging introduction
Kubernetes logging introductionKubernetes logging introduction
Kubernetes logging introduction
 
Kubernetes monitoring introduction
Kubernetes monitoring introductionKubernetes monitoring introduction
Kubernetes monitoring introduction
 
Istio service mesh introduction
Istio service mesh introductionIstio service mesh introduction
Istio service mesh introduction
 
Multi cluster management with rancher
Multi cluster management with rancherMulti cluster management with rancher
Multi cluster management with rancher
 

Recently uploaded

論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizesatsushi061452
 
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)NTT DATA Technology & Innovation
 
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptxssuserbefd24
 
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...atsushi061452
 
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。iPride Co., Ltd.
 
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptxyassun7010
 
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアルLoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアルCRI Japan, Inc.
 
20240523_IoTLT_vol111_kitazaki_v1___.pdf
20240523_IoTLT_vol111_kitazaki_v1___.pdf20240523_IoTLT_vol111_kitazaki_v1___.pdf
20240523_IoTLT_vol111_kitazaki_v1___.pdfAyachika Kitazaki
 
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)keikoitakurag
 

Recently uploaded (10)

論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
論文紹介: Offline Q-Learning on diverse Multi-Task data both scales and generalizes
 
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
YugabyteDB適用に向けた取り組みと隠れた魅力 (DSS Asia 2024 発表資料)
 
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
2024年5月25日Serverless Meetup大阪 アプリケーションをどこで動かすべきなのか.pptx
 
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
論文紹介: Exploiting semantic segmentation to boost reinforcement learning in vid...
 
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
MPAなWebフレームワーク、Astroの紹介 (その2) 2024/05/24の勉強会で発表されたものです。
 
【AI論文解説】Consistency ModelとRectified Flow
【AI論文解説】Consistency ModelとRectified Flow【AI論文解説】Consistency ModelとRectified Flow
【AI論文解説】Consistency ModelとRectified Flow
 
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
2024年度_サイバーエージェント_新卒研修「データベースの歴史」.pptx
 
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアルLoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
LoRaWAN 4チャンネル電流センサー・コンバーター CS01-LB 日本語マニュアル
 
20240523_IoTLT_vol111_kitazaki_v1___.pdf
20240523_IoTLT_vol111_kitazaki_v1___.pdf20240523_IoTLT_vol111_kitazaki_v1___.pdf
20240523_IoTLT_vol111_kitazaki_v1___.pdf
 
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
Amazon Cognitoで実装するパスキー (Security-JAWS【第33回】 勉強会)
 

Git入門