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で管理してるディレクトリの削除手順.pdf
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
aika
May 20, 2014
200
1
Share
Gitで管理してるディレクトリの削除手順.pdf
aika
May 20, 2014
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.4k
Done Done
chrislema
186
16k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
160
4 Signs Your Business is Dying
shpigford
187
22k
SEO for Brand Visibility & Recognition
aleyda
0
4.5k
[SF Ruby Conf 2025] Rails X
palkan
2
960
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
190
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
180
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
61k
It's Worth the Effort
3n
188
29k
Transcript
間違えたから発表 Gitで管理してるディレクトリの削除手順
ふつうの手順 ディレクトリとかを削除したいときは git rm hoge をつかう これで消したいディレクトリとかが削除されて Githubの管理からも外れる
今回間違えたこと git rm を使わないで 普通に rm –rf ディレクトリ~ で 消しちゃった☆
今回間違えたこと GitHub上にずっとディレクトリが残ってる branch切ったりする時に、このディレクトリないよー! ってめっちゃ言ってきてうるさい← (毎度びっくりする) ていうことになっちゃった・・・
こんなときの対処 git rm -r hoge -r をつけて実行すると強制削除になる これで GitHub 上からも消える
解決ー わーいヽ(=´▽`=)ノ、
あとプラス+ このディレクトリ、ローカルには残すけど もう git で管理しなくていいなーってやつがあった場合 git rm --cached hoge ってやると、git
の管理からは外れるけど、 ディレクトリは残る
まとめ ディレクトリとか消す時 • git rm hoge さきにディレクトリとか消しちゃった時 • git rm
-r hoge ローカルには残すけど、git の管理からは 外したいものがある時 • git rm --cached hoge