Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Git入門
Search
Kyohei Mizumoto
October 10, 2018
Technology
0
66
Git入門
Kyohei Mizumoto
October 10, 2018
Tweet
Share
More Decks by Kyohei Mizumoto
See All by Kyohei Mizumoto
サイバーセキュリティの最新動向:脅威と対策
kyohmizu
1
220
コンテナセキュリティの基本と脅威への対策
kyohmizu
4
1.5k
安全な Kubernetes 環境を目指して
kyohmizu
4
1.1k
Unlocking Cloud Native Security
kyohmizu
5
1.3k
コンテナ × セキュリティ × AWS
kyohmizu
10
3.8k
コンテナセキュリティ
kyohmizu
10
4.2k
コンテナイメージのマルウェア検出とその実用性について
kyohmizu
4
3.4k
Play with 🐐 in Kubernetes
kyohmizu
1
1.3k
Security Command Center × PagerDuty 自動アラート通知の取り組み
kyohmizu
0
620
Other Decks in Technology
See All in Technology
組織貢献をするフリーランスエンジニアという生き方
n_takehata
1
1k
家電アプリ共通PF "Linova" のAPI利用とPostman活用事例ご紹介
yukiogawa
0
130
All you need to know about InnoDB Primary Keys
lefred
0
120
室長と気ままに学ぶマイクロソフトのビジネスアプリケーションとビジネスプロセス
ryoheig0405
0
320
アジャイル開発とスクラム
araihara
0
160
第13回 Data-Centric AI勉強会, 画像認識におけるData-centric AI
ksaito_osx
0
360
転生CISOサバイバル・ガイド / CISO Career Transition Survival Guide
kanny
2
390
ハッキングの世界に迫る~攻撃者の思考で考えるセキュリティ~
nomizone
12
4.5k
これからSREになる人と、これからもSREをやっていく人へ
masayoshi
6
4.1k
個人開発から公式機能へ: PlaywrightとRailsをつなげた3年の軌跡
yusukeiwaki
10
2.7k
プロセス改善による品質向上事例
tomasagi
1
1.6k
スクラムのイテレーションを導入してチームの雰囲気がより良くなった話
eccyun
0
110
Featured
See All Featured
A Philosophy of Restraint
colly
203
16k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Unsuck your backbone
ammeep
669
57k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
It's Worth the Effort
3n
184
28k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
29
2.2k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
KATA
mclloyd
29
14k
Mobile First: as difficult as doing things right
swwweet
223
9.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
630
Art, The Web, and Tiny UX
lynnandtonic
298
20k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
45
2.3k
Transcript
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 "
[email protected]
" 作成される".ssh\id_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