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
200
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Gitで管理してるディレクトリの削除手順.pdf
aika
May 20, 2014
Featured
See All Featured
The World Runs on Bad Software
bkeepers
PRO
72
12k
Odyssey Design
rkendrick25
PRO
2
690
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
230
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
How to Ace a Technical Interview
jacobian
281
24k
Fireside Chat
paigeccino
42
3.9k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.5k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2k
Chasing Engaging Ingredients in Design
codingconduct
0
220
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
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