Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
cookpad summer internship 2018 - Git
Search
Kazuhito Hokamura
September 18, 2018
Technology
1
9.8k
cookpad summer internship 2018 - Git
Kazuhito Hokamura
September 18, 2018
Tweet
Share
More Decks by Kazuhito Hokamura
See All by Kazuhito Hokamura
TypeScriptとGraphQLで実現する 型安全なAPI実装 / TSKaigi 2024
hokaccha
5
4.9k
Kotlin製のGraphQLサーバーをNode.jsでモジュラモノリス化している話
hokaccha
0
3.7k
GraphQLの負債と向き合うためにやっていること
hokaccha
2
1.5k
ユビーのアーキテクチャに対する取り組み
hokaccha
1
450
RailsエンジニアのためのNext.js入門
hokaccha
7
21k
Cookpad Summer Internship 2021 Web Frontend
hokaccha
0
7.3k
巨大なモノリシック Rails アプリケーションの マイクロサービス化戦略 / 2019 microservices in cookpad
hokaccha
3
4k
巨大なRailsアプリケーションを「普通」にするための取り組み
hokaccha
1
1k
Web Frontend Improvement in Cookpad
hokaccha
1
1.1k
Other Decks in Technology
See All in Technology
Snowflake Industry Days 2025 Nowcast
takumimukaiyama
0
120
202512_AIoT.pdf
iotcomjpadmin
0
150
『君の名は』と聞く君の名は。 / Your name, you who asks for mine.
nttcom
1
120
ActiveJobUpdates
igaiga
1
320
Building Serverless AI Memory with Mastra × AWS
vvatanabe
0
600
100以上の新規コネクタ提供を可能にしたアーキテクチャ
ooyukioo
0
260
AgentCore BrowserとClaude Codeスキルを活用した 『初手AI』を実現する業務自動化AIエージェント基盤
ruzia
7
1.6k
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
9.9k
Oracle Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
2
200
20251203_AIxIoTビジネス共創ラボ_第4回勉強会_BP山崎.pdf
iotcomjpadmin
0
140
Connection-based OAuthから学ぶOAuth for AI Agents
flatt_security
0
380
2025-12-27 Claude CodeでPRレビュー対応を効率化する@機械学習社会実装勉強会第54回
nakamasato
4
1.1k
Featured
See All Featured
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Joys of Absence: A Defence of Solitary Play
codingconduct
1
260
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.6k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
65
35k
What does AI have to do with Human Rights?
axbom
PRO
0
1.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
38
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
0
310
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
860
Transcript
Git/GitHub クックパッド サマーインターンシップ 10 Day Tech for service engineers
Git使ったことある人
この講義の内容 • Git/GitHubを使ったチーム開発での流れを理解する • Cookpadでのルールやワークフローを知る
Git
Git • 分散型のバージョン管理システム • Linuxの作者であるLinus Torvaldsによって開発された
Reference •Gitコマンドの使い方を調べる ‣ https://git-scm.com/docs ‣ git help •Gitを体系的に学ぶ ‣ https://git-scm.com/book/en/v2
•ユーザー設定 $ git config --global user.name "Your full name" $
git config --global user.email "your email address" •リポジトリ作成 $ mkdir -p ~/works/git-practice $ cd ~/works/git-practice $ git init •コミット $ echo '# Hello cookpad!' > README.md $ git add README.md $ git commit -m 'Add README.md'
コミットメッセージ •コミットメッセージは英語で書く(社内ルール) •1行目に概要を書く •必要に応じて3行目以降に詳細を書く
Branch
Branchとは •履歴を枝分かれさせることができる •複数の機能を同時に開発することができる •枝分かれした履歴は特定の枝(branch)に合流 (merge)することができる
None
•新しくブランチを作って切替 $ git branch new-branch $ git checkout new-branch •まとめてやる
$ git checkout -b new-branch
merge •Gitは 3-way merge という賢いマージのアルゴリズム でマージする •2つのファイルを単純に比較するのではなくそれぞれの 共通の親と差分を比較する
merge $ git checkout master $ git merge new-branch [--ff/--no-ff]
None
None
None
fast forward merge
--no-ff
ff vs no-ff •Pull Requestのマージは merge commitをつくる •GitHubのUIからマージする 場合はデフォルト no-ff
Recovery
•間違えてaddした $ git reset [<path/to/file>] •間違えてコミットした $ git reset HEAD^
•間違えてファイルを編集したり消してしまったので元に戻したい $ git checkout <path/to/file> $ git checkout .
•ブランチ名間違えた $ git branch -m new-branch-name •バグがあるコードをmasterにマージしてしまったので取り消したい $ git revert
-m 1 <merge-commit> •間違えてコミットを取り消した、マージしてないブランチを 消してしまった $ git reflog $ git reset --hard <SHA1>
GitHub
GitHub •Gitのリモートリポジトリをホスティングするサービス •開発時に便利な様々な機能がある •現代の開発フローにおける中心的存在 •CookpadではGitHub Enterprise(GHE)を利用
ForkとPull Request •Fork ‣ 他の人のリモートリポジトリを自分のリポジトリとして コピーする機能 •Pull Request ‣ 自分が行った変更を元のブランチに取り込んでもらえる
ように通知する機能
GitHub Work Flow 1. 変更対象のリポジトリをForkしてclone 2. branchを切って変更をcommit, push 3. Pull
Request 4. コードレビュー 5. マージ
tech/cookpad_all your-name/cookpad_all Local Fork Pull Request push pull upstream origin
•forkしたリポジトリを手元にコピーする $ git clone
[email protected]
:your-name/repo.git •作業ブランチを切る $ git checkout -b
new-feature •変更をリモートリポジトリに反映する $ git commit -m $ git push origin new-branch
•upstreamのリモートリポジトリを設定 $ git remote add upstream
[email protected]
:owner/repo.git •リモートリポジトリの設定を確認 $ git
remote -v •最新の状態を手元に持ってくる $ git checkout master $ git pull upstream master
Practice
1. summer-intern/self-introduction をfork 2. 作業用ブランチを切る 3. "your-name.md" というファイルを作って簡単な自己紹介を書く 4. 変更をPushしてPull
Requestを作成 5. マージされたらupstreamから最新の状態をローカルに反映する