Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
演習:Gitの操作(応用編) / GitHub Practice Advanced
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
kaityo256
PRO
October 22, 2021
Education
1.7k
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
演習:Gitの操作(応用編) / GitHub Practice Advanced
物理情報工学ソフトウェア開発演習
kaityo256
PRO
October 22, 2021
More Decks by kaityo256
See All by kaityo256
生成AIとの付き合い方/ How to work with AI
kaityo256
PRO
3
790
パズルゲームの作り方 / how to make puzzle games
kaityo256
PRO
2
270
What is XAI?
kaityo256
PRO
0
210
勾配ブースティングと決定木の話 / gradient boosting and decision trees
kaityo256
PRO
7
1.9k
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
16
6.1k
この講義について / 00-setup
kaityo256
PRO
2
540
GitHubによるWebアプリケーションのデプロイ / 07-github-deploy
kaityo256
PRO
2
480
演習:Gitの基本操作 / 04-git-basic
kaityo256
PRO
1
730
演習:Gitの応用操作 / 05-git-advanced
kaityo256
PRO
1
430
Other Decks in Education
See All in Education
Science Tokyo University for International Research Excellence scheme_April 2026
sciencetokyo
PRO
0
420
Soluciones al examen de Geografía 2026. JULIO (Convocatoria Extraordinaria)
juanmartin2026
1
20k
マークシート試験のTeX言語を用いた自動採点について
doratex
0
5.5k
General Introduction, Composition, Chemistry & Chemical Classes, Biosources, Therapeutic uses and Commercial Application of Secondary Metabolites.
drpoonamkc
0
150
1007
cbtlibrary
0
140
Dronegeografía innovación didáctica y fotogrametría 3D para la enseñanza de la geografía local y la ciudadaniía activa
juanmartin2026
0
8.7k
GENERAL PHARMACOLOGY
pawan_pharm
0
180
Beyond the Prompt: Programming as a Pathway to Statistical Thinking
minecr
0
420
SANG PENCIPTA BERBICARA (01ABSG-Q4-2026)
ssmedikasda
0
430
25-26 CBT Library top items
cbtlibrary
0
340
[2026後期火5] 論理学(京都大学文学部 後期 第1回)「名前はあるのに、誰なのかわからない」
yatabe
0
130
批判的応用言語学ワークショップ(2026-08-12 お茶の⽔⼥⼦⼤学)
terasawat
0
210
Featured
See All Featured
The Art of Programming - Codeland 2020
erikaheidi
57
14k
What the history of the web can teach us about the future of AI
inesmontani
PRO
2
730
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.3k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
690
Ten Tips & Tricks for a 🌱 transition
stuffmc
1
250
How to Ace a Technical Interview
jacobian
280
24k
A Modern Web Designer's Workflow
chriscoyier
699
190k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
270
WENDY [Excerpt]
tessaabrams
14
40k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
710
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Mind Mapping
helmedeiros
1
390
Transcript
1 29 演習:Gitの操作(応用編) 慶應義塾大学理工学部物理情報工学科 渡辺 物理情報工学ソフトウェア開発演習
2 29 • git amendによりコミットが変更されることを確認する • git mergeの衝突を解決する • git
rebaseにより歴史を改変する • git rebaseの衝突を解決する • git bisectを使ってみる
3 29 リポジトリのクローン ディレクトリの作成 github cd mkdir github cd github
git clone https://github.com/appi-github/amend-sample.git cd amend-sample ホームディレクトリに移動してから githubディレクトリを作成 github amend-sample ホームディレクトリ Git管理された ディレクトリ ここがカレントディレクトリに
4 29 git log --oneline initial commit updates README.md updates
README.md updaets README.md main HEAD 歴史の確認
5 29 コミットの保存 initial commit updates README.md updates README.md updaets
README.md main HEAD original_main git branch original_main 現在のコミットに別名をつけておく
6 29 コミットメッセージの修正 git commit --amend -m "updates README.md" initial
commit updates README.md updates README.md updaets README.md main HEAD original_main updates README.md
7 29 git log --oneline 歴史の確認 initial commit updates README.md
updates README.md updates README.md main HEAD 修正されていることを確認
8 29 git log --all --graph --oneline 歴史が分岐したことを確認 initial commit
updates README.md updates README.md updaets README.md main HEAD original_main updates README.md
9 29 リポジトリのクローン cd cd github git clone https://github.com/appi-github/merge-sample.git cd
merge-sample github merge-sample ここがカレントディレクトリに
10 29 ブランチの作成 git branch knock origin/knock main HEAD knock
ブランチの確認 git branch -vva main HEAD origin/knock origin/knock origin/knockの指すコミットに knockブランチを作成
11 29 差分確認 main HEAD knock git diff knock poetry.txt
poetry.txt コミット間を比較 ここに差分を検出
12 29 マージ main HEAD knock 衝突 git merge knock
マージの中断 git merge --abort main HEAD knock このプロセスでpoetry.txtが どのように変化したか調べる
13 29 マージ git merge knock main HEAD knock 衝突
衝突の解決とコミット git add poetry.txt git commit -m "knock" potery.txtをエディタで修正
14 29 main HEAD knock git log --all --graph --oneline
マージされた「歴史」を確認
15 29 リポジトリのクローン cd cd github git clone https://github.com/appi-github/rebase-history-sample.git cd
rebase-history-sample github rebase-history-sample ここがカレントディレクトリに
16 29 二人が目を覚ます アイスがまだある アイスが消えた ボブが登校 歴史の確認 git log --oneline
17 29 ブランチの作成 git branch start origin/start 二人が目を覚ます アイスがまだある アイスが消えた
ボブが登校 main HEAD knock 歴史改変の起点にする
18 29 歴史改変 git rebase -i start
19 29 改変された歴史の確認 git log --oneline 二人が目を覚ます アイスがまだある アイスが消えた ボブが登校
20 29 リポジトリのクローン cd cd github git clone https://github.com/appi-github/rebase-conflict-sample cd
rebase-conflict-sample github rebase-conflict-sample ここがカレントディレクトリに
21 29 main HEAD branch origin/branch ブランチの準備 git switch -c
branch origin/branch origin/branchの指すコミットにbranchというブランチを作成し、 カレントブランチをそこへ移動
22 29 歴史の確認 git log --all --graph --oneline main HEAD
branch m1 m2 m3 f1 f2 f3
23 29 リベースの実行 git rebase main main HEAD branch
24 29 main m1 m2 m3 f1 f2 f3 f1’
f2’ f3’ 状態の確認 git status HEAD HEADは「最後にリベースがうまくいったコミット」を指している (detached HEAD)
25 29 main m1 m2 m3 f1 f2 f3 f1’
f2’ f3’ HEAD エディタで衝突状態にあるファイル「text1.txt」を修正し、保存する
26 29 解決をGitに伝える git add text1.txt git commit -m "f2"
main m1 m2 m3 f1 f2 f3 f1’ f2’ f3’ HEAD Gitが自動で作ることができなかった このコミットを手動で作った
27 29 リベースの続行 git rebase --continue main m1 m2 m3
f1’ f2’ f3’ HEAD branch リベースが最後まで実行され、detached HEAD状態が解消される
28 29 歴史の確認 git log --oneline --graph main m1 m2
m3 f1’ f2’ f3’ HEAD branch もともと分岐していた歴史が一本道になり、 mainからbranchへfast-forwardマージが可能になった
29 29 git bisectを使った犯人捜し