Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove directory from remote repository after adding them to .gitignore
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin master
@rahbal

This comment has been minimized.

Copy link

@rahbal rahbal commented Jun 6, 2018

works. thank you.

@blended-ideas

This comment has been minimized.

Copy link

@blended-ideas blended-ideas commented Jun 12, 2018

Wow., Simple and effective. Thank you..!!

@Rohitkrops

This comment has been minimized.

Copy link

@Rohitkrops Rohitkrops commented Jul 14, 2018

Great solution, worked like a magic

@ssougnez

This comment has been minimized.

Copy link

@ssougnez ssougnez commented Jul 23, 2018

Thanks

@knutvalen

This comment has been minimized.

Copy link

@knutvalen knutvalen commented Jul 25, 2018

Thank you!

@Navidnkh

This comment has been minimized.

Copy link

@Navidnkh Navidnkh commented Jul 29, 2018

Thanks

@rahuls321

This comment has been minimized.

Copy link

@rahuls321 rahuls321 commented Aug 4, 2018

Thanks @sabarasaba

@paulbirchamBBK

This comment has been minimized.

Copy link

@paulbirchamBBK paulbirchamBBK commented Aug 14, 2018

Thanks!

@snakydragon

This comment has been minimized.

Copy link

@snakydragon snakydragon commented Aug 15, 2018

Thanks! It works magically!

@benhoverter

This comment has been minimized.

Copy link

@benhoverter benhoverter commented Aug 23, 2018

Thanks from another git noob!

@Eduard0x6F

This comment has been minimized.

Copy link

@Eduard0x6F Eduard0x6F commented Aug 30, 2018

Thanks man! You've saved my time! <3

@Michelasso

This comment has been minimized.

Copy link

@Michelasso Michelasso commented Sep 6, 2018

It worked just fine! Thanks a lot!

@moravveji

This comment has been minimized.

Copy link

@moravveji moravveji commented Sep 11, 2018

Just asking to make sure:
After following the excellent suggestion above to remove a directory , should I still keep the "MyDir" entry in my .gitignore file?
I would like to protect it against an unwanted upload during the next push.

@tirudevi

This comment has been minimized.

Copy link

@tirudevi tirudevi commented Oct 5, 2018

How to remove project folder from current repository

@maddy-nit

This comment has been minimized.

Copy link

@maddy-nit maddy-nit commented Oct 25, 2018

Thanks. It worked.

@krolovolk

This comment has been minimized.

Copy link

@krolovolk krolovolk commented Oct 25, 2018

Thanks! Simply and efficiently

@Phionanamugga

This comment has been minimized.

Copy link

@Phionanamugga Phionanamugga commented Nov 27, 2018

Thank you

@savicas

This comment has been minimized.

Copy link

@savicas savicas commented Dec 5, 2018

Fantastic. Thank you!

@arcandio

This comment has been minimized.

Copy link

@arcandio arcandio commented Dec 6, 2018

Worked perfectly, thanks!

@afshintalebi

This comment has been minimized.

Copy link

@afshintalebi afshintalebi commented Jan 5, 2019

Great, Thanks.

@guljarpd

This comment has been minimized.

Copy link

@guljarpd guljarpd commented Feb 9, 2019

Thanks, Create Work!

@trangthanhtam

This comment has been minimized.

Copy link

@trangthanhtam trangthanhtam commented Feb 20, 2019

Hi, simple and perfect 👍

@scarneros

This comment has been minimized.

Copy link

@scarneros scarneros commented Feb 20, 2019

Thanks! Works really well!

@t4tiwari19

This comment has been minimized.

Copy link

@t4tiwari19 t4tiwari19 commented Feb 21, 2019

Worked like a charm , Thanks for sweet and simple solution

@Tahirhan

This comment has been minimized.

Copy link

@Tahirhan Tahirhan commented Mar 19, 2019

Thanks

@pb25193

This comment has been minimized.

Copy link

@pb25193 pb25193 commented May 23, 2019

didnt work for me, i got: pathspec 'node_modules' did not match any files

note: my node modules is inside a subfolder. can anyone help?

@DataIsMeta

This comment has been minimized.

Copy link

@DataIsMeta DataIsMeta commented Jul 5, 2019

Thanks!

@tgarijo

This comment has been minimized.

Copy link

@tgarijo tgarijo commented Jul 15, 2019

Thank You!!

@kor1k

This comment has been minimized.

Copy link

@kor1k kor1k commented Aug 21, 2019

Thank you, it works fine!

@juampi92

This comment has been minimized.

Copy link

@juampi92 juampi92 commented Aug 21, 2019

Thanks a lot man!

@sabarasaba

This comment has been minimized.

Copy link
Owner Author

@sabarasaba sabarasaba commented Aug 21, 2019

@juampi92 You look hot with that dog, can I take you on a date?

@juampi92

This comment has been minimized.

Copy link

@juampi92 juampi92 commented Aug 21, 2019

@sabarasaba with me or with the dog?

@sabarasaba

This comment has been minimized.

Copy link
Owner Author

@sabarasaba sabarasaba commented Aug 21, 2019

@juampi92 yes

@clockshark

This comment has been minimized.

Copy link

@clockshark clockshark commented Sep 27, 2019

worked for me..thanks

@DataIsMeta

This comment has been minimized.

Copy link

@DataIsMeta DataIsMeta commented Oct 1, 2019

@juampi92 yes

Please let us know how the date went.

@bilalelhoudaigui

This comment has been minimized.

Copy link

@bilalelhoudaigui bilalelhoudaigui commented Nov 12, 2019

Thanks!

@personalaccount

This comment has been minimized.

Copy link

@personalaccount personalaccount commented Nov 18, 2019

thanks :)

@misakimichy

This comment has been minimized.

Copy link

@misakimichy misakimichy commented Nov 22, 2019

Thank you!!!!

@abdalmoez

This comment has been minimized.

Copy link

@abdalmoez abdalmoez commented Jan 28, 2020

Thanks!!!!!!

@CrazyOptimist

This comment has been minimized.

Copy link

@CrazyOptimist CrazyOptimist commented Jan 29, 2020

Thanks

@DEEP0521

This comment has been minimized.

Copy link

@DEEP0521 DEEP0521 commented Feb 18, 2020

Thank you it's really helpful

@TamaraTorres

This comment has been minimized.

Copy link

@TamaraTorres TamaraTorres commented Mar 20, 2020

thanks!!!

@pawellesniowski

This comment has been minimized.

Copy link

@pawellesniowski pawellesniowski commented Apr 2, 2020

thanks a million!!!

@joctorres13

This comment has been minimized.

Copy link

@joctorres13 joctorres13 commented Apr 22, 2020

thank you!

@DragonflyNet67

This comment has been minimized.

Copy link

@DragonflyNet67 DragonflyNet67 commented Apr 25, 2020

Thank you, exactly what I was looking for

@luislortega

This comment has been minimized.

Copy link

@luislortega luislortega commented Apr 29, 2020

Nice TY dude.

@giovanialtelino

This comment has been minimized.

Copy link

@giovanialtelino giovanialtelino commented Jun 29, 2020

I always need to search for it, guess If I comment, it will rank better at the searches. ;)

@AlbertBeweb

This comment has been minimized.

Copy link

@AlbertBeweb AlbertBeweb commented Sep 6, 2020

Thank you !!

@Nour963

This comment has been minimized.

Copy link

@Nour963 Nour963 commented Oct 14, 2020

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.