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
aika
May 20, 2014
1
200
Gitで管理してるディレクトリの削除手順.pdf
aika
May 20, 2014
Tweet
Share
Featured
See All Featured
A Tale of Four Properties
chriscoyier
160
23k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
33
2.4k
Rebuilding a faster, lazier Slack
samanthasiow
83
9.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
890
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3k
GraphQLの誤解/rethinking-graphql
sonatard
71
11k
Reflections from 52 weeks, 52 projects
jeffersonlam
351
21k
Building Applications with DynamoDB
mza
96
6.6k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
9
770
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.4k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
36
2.5k
It's Worth the Effort
3n
186
28k
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