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生活を送るための細々とした設定
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ShouN
May 20, 2018
Technology
370
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
快適なGit生活を送るための細々とした設定
第4回Git勉強しよう回LT資料です。
ShouN
May 20, 2018
Other Decks in Technology
See All in Technology
FinOps Agentが生んだ技術負債:コスト自動調査の落とし穴と解消までの道のり
oasis1994liveforever
2
140
AI時代のPRレビューにどう向き合うか?
kairim0
1
240
Persisting Massive Data with Rails ~Designing for 60 billion rows, and fighting the bottlenecks~ Railsで挑む大量データ永続化 〜600億件を永続化するための設計とボトルネックとの戦い〜
occhi
0
740
LambdaWebFunctionsを試してみた / exploring-lambda-web-functions
koukihosaka
1
360
価値について
gree_tech
PRO
0
100
Tofu-Controller lightning talk @ Containerday 2026
gionn
0
120
Gemini Intelligence 入門 ― AppFunctions と Gemini Nano
takuroabe
0
300
スプシの手作業からの解脱 ~更新はClaude Codeに、見せ方と使い方はGASアプリに任せる~
kentarofujii
0
160
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
8
3.1k
大型犬好きによるPugの紹介
yamanoku
1
160
会社紹介資料 / Sansan Company Profile
sansan33
PRO
31
430k
WasmをRustにする
sansantech
PRO
0
280
Featured
See All Featured
Large-scale JavaScript Application Architecture
addyosmani
516
110k
Game over? The fight for quality and originality in the time of robots
wayneb77
1
310
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2.2k
Context Engineering - Making Every Token Count
addyosmani
9
1.2k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
370
Why Our Code Smells
bkeepers
PRO
340
58k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
Transcript
快適なGit生活を送るための 細々とした設定 2018/5/19 ShouN
自己紹介 ★ShouN ・25歳 ・エンジニア2年目 ・主にPHP使い ・RubyonRails勉強中 ・人生初LTです(勝手がわからない…)
大体の流れ ① Gitアカウントの使い分け ② Githubリポジトリにプッシュするときに認証レスにする
Gitアカウントの使い分け
こんなことが… 弊社リポジトリのログ見てたら、 ShouNでプッシュしてた… 取引先も見てるのに… 会社PCでGitアカウントを 使い分けたい…
Gitのアカウント情報ってどこで管理して る? 3つの設定ファイルで管理
System設定ファイル
システム全体のGitの設定を管理
Global設定ファイル(~/.gitconfig)
ユーザーごとのGitの設定を管理
Local設定ファイル({リポジトリ}/.git/config)
リポジトリごとのGitの設定を管理
System => Global => Local の順で設定が読み込まれる
主に使用するアカウント => Globalで設定 例)会社のPCならここに本名を設 定
このリポジトリは このアカウントを使いたい… =>Localで設定 例)会社PCで、自分以外使わないリポジトリ(dotfilesな ど)はここにプライベートアカウントを設定
早速設定しよう
ターミナルから
まずは設定済かどうか確認 ① ①:設定したいリポジトリに移動 ②:localの設定ファイルの中身を確認 => user.nameとuser.emailがなければアカウント設定はされていない! ②
アカウントを設定 ①アカウント名を設定ファイルに追加 ②メールアドレスを設定ファイルに追加 ③再度設定ファイルを確認 => user.nameとuser.emailが表示されれば設定完了! ① ② ③ global設定ファイルを編集したい場合
は、 オプション--localを--globalにする
設定ファイルの中身を見てみる(蛇足)
さっき入力した情報がちゃんと書き込まれている
コマンド入力が面倒な人は エディタで編集してもよいよ
Githubにプッシュするときに認証レスにす る
こんなことが… 編集終わったしプッ シュしよう パスワード間違えた かな おかしいな あああああああああああ ああああああ あ!!!!!
SSH鍵認証にすれば解決!
まずは設定を確認 git remote -v http通信になっているので、毎回アカウントを聞かれる
SSH通信に変更 https://の部分を修正する git remote set-url origin
[email protected]
:[リポジトリURL] 変更されたか確認 git remote
-v
試しにプッシュしてみる アカウントとパスワードを聞かれなくなった。