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
110
サイバーセキュリティの最新動向:脅威と対策
kyohmizu
1
230
コンテナセキュリティの基本と脅威への対策
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
Other Decks in Technology
See All in Technology
転生CISOサバイバル・ガイド / CISO Career Transition Survival Guide
kanny
3
1.1k
OSS構成管理ツールCMDBuildを使ったAWSリソース管理の自動化
satorufunai
0
360
OpenID Connect for Identity Assurance の概要と翻訳版のご紹介 / 20250219-BizDay17-OIDC4IDA-Intro
oidfj
0
380
一度 Expo の採用を断念したけど、 再度 Expo の導入を検討している話
ichiki1023
1
240
短縮URLをお手軽に導入しよう
nakasho
0
110
30分でわかる『アジャイルデータモデリング』
hanon52_
10
2.9k
偏光画像処理ライブラリを作った話
elerac
1
120
抽象化をするということ - 具体と抽象の往復を身につける / Abstraction and concretization
soudai
27
14k
Amazon S3 Tablesと外部分析基盤連携について / Amazon S3 Tables and External Data Analytics Platform
nttcom
0
150
AI エージェント開発を支える MaaS としての Azure AI Foundry
ryohtaka
6
640
Share my, our lessons from the road to re:Invent
naospon
0
110
表現を育てる
kiyou77
1
230
Featured
See All Featured
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
330
21k
Building Your Own Lightsaber
phodgson
104
6.2k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
12
980
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.4k
Music & Morning Musume
bryan
46
6.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.3k
Optimizing for Happiness
mojombo
376
70k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
9
500
Facilitating Awesome Meetings
lara
52
6.2k
Thoughts on Productivity
jonyablonski
69
4.5k
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