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
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
0
1.1k
Facilitating Awesome Meetings
lara
57
6.7k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.2k
A better future with KSS
kneath
240
18k
Believing is Seeing
oripsolob
0
19
The Invisible Side of Design
smashingmag
302
51k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
1.7k
A Tale of Four Properties
chriscoyier
162
23k
エンジニアに許された特別な時間の終わり
watany
106
220k
Building an army of robots
kneath
306
46k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
1
220
YesSQL, Process and Tooling at Scale
rocio
174
15k
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