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
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
26
2.3k
Debugging Ruby Performance
tmm1
70
11k
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.1k
What's in a price? How to price your products and services
michaelherold
238
11k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
In The Pink: A Labor of Love
frogandcode
138
21k
Producing Creativity
orderedlist
PRO
338
39k
How STYLIGHT went responsive
nonsquared
92
4.8k
The Cost Of JavaScript in 2023
addyosmani
21
3.9k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
323
20k
The Pragmatic Product Professional
lauravandoore
26
5.8k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
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