Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Remove node_modules from git repo
#add 'node_modules' to .gitignore file
git rm -r --cached node_modules
git commit -m 'Remove the now ignored directory node_modules'
git push origin <branch-name>
@ericwebster

This comment has been minimized.

Copy link

@ericwebster ericwebster commented Jan 17, 2015

Thanks for the snippet, just what I needed.

@nuriel

This comment has been minimized.

Copy link

@nuriel nuriel commented Apr 12, 2015

πŸ‘

@catamphetamine

This comment has been minimized.

Copy link

@catamphetamine catamphetamine commented May 11, 2015

+1

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jun 29, 2015

+1

@pleaseshutup

This comment has been minimized.

Copy link

@pleaseshutup pleaseshutup commented Jul 16, 2015

+1

@marekdano

This comment has been minimized.

Copy link

@marekdano marekdano commented Aug 23, 2015

+1

@petekp

This comment has been minimized.

Copy link

@petekp petekp commented Sep 7, 2015

+1

@mtsewrs

This comment has been minimized.

Copy link

@mtsewrs mtsewrs commented Sep 25, 2015

+1

@RichMatthews

This comment has been minimized.

Copy link

@RichMatthews RichMatthews commented Nov 17, 2015

+1

@sasivarnan

This comment has been minimized.

Copy link

@sasivarnan sasivarnan commented Nov 20, 2015

+1

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Nov 20, 2015

Perfecto...

@SaintPeter

This comment has been minimized.

Copy link

@SaintPeter SaintPeter commented Nov 23, 2015

+1

@jeanmallet

This comment has been minimized.

Copy link

@jeanmallet jeanmallet commented Dec 10, 2015

+1

@carlosmachel

This comment has been minimized.

Copy link

@carlosmachel carlosmachel commented Dec 12, 2015

Thanks!

@inomdzhon

This comment has been minimized.

Copy link

@inomdzhon inomdzhon commented Dec 23, 2015

Great! Thx!

@pcooney10

This comment has been minimized.

Copy link

@pcooney10 pcooney10 commented Dec 23, 2015

πŸ‘Œ

@LatinWarrior

This comment has been minimized.

Copy link

@LatinWarrior LatinWarrior commented Jan 14, 2016

Neat!

@djperezh

This comment has been minimized.

Copy link

@djperezh djperezh commented Jan 25, 2016

Gr8 ! Thx

@jtolla

This comment has been minimized.

Copy link

@jtolla jtolla commented Jan 27, 2016

+1

@rrenwick

This comment has been minimized.

Copy link

@rrenwick rrenwick commented Feb 8, 2016

many thanks!

@remotewhiteboard

This comment has been minimized.

Copy link

@remotewhiteboard remotewhiteboard commented Feb 9, 2016

Does every developer have to run this?

@gijigae

This comment has been minimized.

Copy link

@gijigae gijigae commented Feb 16, 2016

+1 Thank you so much for the gist!

@marcinkrzeminski

This comment has been minimized.

Copy link

@marcinkrzeminski marcinkrzeminski commented Feb 20, 2016

Thanks for sharing 🍻

@adamfratino

This comment has been minimized.

Copy link

@adamfratino adamfratino commented Mar 1, 2016

+1 thank you!

@marcosicp

This comment has been minimized.

Copy link

@marcosicp marcosicp commented Mar 2, 2016

+1 thanks !!

@sudhamab

This comment has been minimized.

Copy link

@sudhamab sudhamab commented Mar 3, 2016

+1 super useful!

@chuxolatouz

This comment has been minimized.

Copy link

@chuxolatouz chuxolatouz commented Mar 5, 2016

+1 Very useful! Thanks!!

@zacps

This comment has been minimized.

Copy link

@zacps zacps commented Mar 14, 2016

+1 lol

@tormod17

This comment has been minimized.

Copy link

@tormod17 tormod17 commented Mar 21, 2016

thanks πŸ‘

@tkrishnanite

This comment has been minimized.

Copy link

@tkrishnanite tkrishnanite commented Mar 22, 2016

Thanks

@el-samchuk

This comment has been minimized.

Copy link

@el-samchuk el-samchuk commented Mar 22, 2016

Thanks, you save'd me!

@superCarton

This comment has been minimized.

Copy link

@superCarton superCarton commented Apr 19, 2016

Thanks !

@andrrrl

This comment has been minimized.

Copy link

@andrrrl andrrrl commented Apr 30, 2016

Zarpado! xD

@cihankoseoglu

This comment has been minimized.

Copy link

@cihankoseoglu cihankoseoglu commented May 5, 2016

This. +1

@backslash112

This comment has been minimized.

Copy link

@backslash112 backslash112 commented May 26, 2016

+1

@AlexChaseJones

This comment has been minimized.

Copy link

@AlexChaseJones AlexChaseJones commented Jun 7, 2016

+1

@Davittt-zz

This comment has been minimized.

Copy link

@Davittt-zz Davittt-zz commented Jul 11, 2016

Muchas Gracias!

@racheats

This comment has been minimized.

Copy link

@racheats racheats commented Jul 21, 2016

πŸ‘

@travissanon

This comment has been minimized.

Copy link

@travissanon travissanon commented Jul 25, 2016

+1 Was wondering if I really did need to push my node_modules along with my project.

@iamtracy

This comment has been minimized.

Copy link

@iamtracy iamtracy commented Aug 1, 2016

Thank you good sir

@mindgriot

This comment has been minimized.

Copy link

@mindgriot mindgriot commented Aug 12, 2016

Thank you!

@AnasTawfeek

This comment has been minimized.

Copy link

@AnasTawfeek AnasTawfeek commented Aug 16, 2016

+1

@JacksonBates

This comment has been minimized.

Copy link

@JacksonBates JacksonBates commented Aug 21, 2016

Just what the doctor ordered! Thanks πŸ‘

@jacobpaine

This comment has been minimized.

Copy link

@jacobpaine jacobpaine commented Aug 27, 2016

+1

@innerfirexy

This comment has been minimized.

Copy link

@innerfirexy innerfirexy commented Sep 7, 2016

+1

@thehulke

This comment has been minimized.

Copy link

@thehulke thehulke commented Sep 18, 2016

+1

@monsteronfire

This comment has been minimized.

Copy link

@monsteronfire monsteronfire commented Sep 21, 2016

Awesome! πŸ‘

@Moniarchy

This comment has been minimized.

Copy link

@Moniarchy Moniarchy commented Sep 22, 2016

+1

@yepelinux

This comment has been minimized.

Copy link

@yepelinux yepelinux commented Sep 23, 2016

+1 thank you!

@araw604

This comment has been minimized.

Copy link

@araw604 araw604 commented Sep 23, 2016

+1 Works like a Charm

@manojsinghnegiwd

This comment has been minimized.

Copy link

@manojsinghnegiwd manojsinghnegiwd commented Oct 1, 2016

Thank you for this .. :)

@lotusgraham

This comment has been minimized.

Copy link

@lotusgraham lotusgraham commented Oct 4, 2016

yeah buddy

@Jase7

This comment has been minimized.

Copy link

@Jase7 Jase7 commented Oct 10, 2016

thanks a lot :)

@feelitloveit

This comment has been minimized.

Copy link

@feelitloveit feelitloveit commented Oct 14, 2016

+1

@Knighton910

This comment has been minimized.

Copy link

@Knighton910 Knighton910 commented Oct 17, 2016

πŸŽ‰ Awesome

@Aetherpoint

This comment has been minimized.

Copy link

@Aetherpoint Aetherpoint commented Oct 17, 2016

Thank you!

@Ikhan

This comment has been minimized.

Copy link

@Ikhan Ikhan commented Oct 22, 2016

+1
Thanks

@yasir2010

This comment has been minimized.

Copy link

@yasir2010 yasir2010 commented Oct 28, 2016

+1
Thanks

@JonathanDn

This comment has been minimized.

Copy link

@JonathanDn JonathanDn commented Oct 29, 2016

+1
Thanks :) useful

@paul-child

This comment has been minimized.

Copy link

@paul-child paul-child commented Oct 30, 2016

+1

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Nov 24, 2016

This is great, thank you!!!!!

@Ceejaymar

This comment has been minimized.

Copy link

@Ceejaymar Ceejaymar commented Nov 27, 2016

Awesome, Thank you!

@arinaldi

This comment has been minimized.

Copy link

@arinaldi arinaldi commented Dec 5, 2016

+1

@tanimmahmud

This comment has been minimized.

Copy link

@tanimmahmud tanimmahmud commented Dec 8, 2016

Thanks for the solution but how and why did this happen in the first place ?

@devMattO

This comment has been minimized.

Copy link

@devMattO devMattO commented Dec 13, 2016

+1

@ymnj

This comment has been minimized.

Copy link

@ymnj ymnj commented Dec 16, 2016

+1

@Raziyehbazargan

This comment has been minimized.

Copy link

@Raziyehbazargan Raziyehbazargan commented Dec 17, 2016

+1

@korshunad

This comment has been minimized.

Copy link

@korshunad korshunad commented Dec 23, 2016

thanks!:)

@Adagio-cantabile

This comment has been minimized.

Copy link

@Adagio-cantabile Adagio-cantabile commented Dec 24, 2016

Thanks for the solution but how and why did this happen in the first place ?

http://stackoverflow.com/questions/11451535/gitignore-not-working explains this

@kccrs

This comment has been minimized.

Copy link

@kccrs kccrs commented Dec 24, 2016

Yay!

@DrDreifus

This comment has been minimized.

Copy link

@DrDreifus DrDreifus commented Dec 27, 2016

+1
Thank you dude!

@sam016

This comment has been minimized.

Copy link

@sam016 sam016 commented Jan 1, 2017

+1

@constantinpojoga

This comment has been minimized.

Copy link

@constantinpojoga constantinpojoga commented Jan 8, 2017

Thanks

@trevorfrese

This comment has been minimized.

Copy link

@trevorfrese trevorfrese commented Jan 12, 2017

thanks

@phillipchan1

This comment has been minimized.

Copy link

@phillipchan1 phillipchan1 commented Jan 14, 2017

πŸ‘

@xstephen95x

This comment has been minimized.

Copy link

@xstephen95x xstephen95x commented Jan 25, 2017

+1

@ghost

This comment has been minimized.

Copy link

@ghost ghost commented Jan 28, 2017

+1

@ForkInSpace

This comment has been minimized.

Copy link

@ForkInSpace ForkInSpace commented Jan 29, 2017

+1

@vfx01j

This comment has been minimized.

Copy link

@vfx01j vfx01j commented Feb 1, 2017

+1

@tonyfreelance

This comment has been minimized.

Copy link

@tonyfreelance tonyfreelance commented Feb 2, 2017

+1 Awesome!

@vjuge

This comment has been minimized.

Copy link

@vjuge vjuge commented Feb 8, 2017

+1

@d1820

This comment has been minimized.

Copy link

@d1820 d1820 commented Feb 10, 2017

++1

@Strifez

This comment has been minimized.

Copy link

@Strifez Strifez commented Feb 11, 2017

+1 =)

@fabionogueira

This comment has been minimized.

Copy link

@fabionogueira fabionogueira commented Feb 14, 2017

+1

@larry-dalmeida

This comment has been minimized.

Copy link

@larry-dalmeida larry-dalmeida commented Feb 16, 2017

+1 Thanks

@zavjs

This comment has been minimized.

Copy link

@zavjs zavjs commented Feb 18, 2017

+1 thanks

@kenguie

This comment has been minimized.

Copy link

@kenguie kenguie commented Feb 20, 2017

Thanks! +1

@jordancclive

This comment has been minimized.

Copy link

@jordancclive jordancclive commented Mar 1, 2017

+1

@Netcodez

This comment has been minimized.

Copy link

@Netcodez Netcodez commented Mar 14, 2017

Thanks! Very helpful.

@nilsi

This comment has been minimized.

Copy link

@nilsi nilsi commented Mar 19, 2017

Awesome!

@jpehman

This comment has been minimized.

Copy link

@jpehman jpehman commented Mar 25, 2017

Yes! Thank you!

@dumptyd

This comment has been minimized.

Copy link

@dumptyd dumptyd commented Mar 26, 2017

+2

@Peripona

This comment has been minimized.

Copy link

@Peripona Peripona commented Mar 27, 2017

πŸ‘ πŸ’―

@teuber789

This comment has been minimized.

Copy link

@teuber789 teuber789 commented Mar 30, 2017

Thanks!

@a-barbieri

This comment has been minimized.

Copy link

@a-barbieri a-barbieri commented Apr 2, 2017

should be a default!

@DiogenisPanagiotis

This comment has been minimized.

Copy link

@DiogenisPanagiotis DiogenisPanagiotis commented Apr 3, 2017

+1 !!!

@mrmaninew

This comment has been minimized.

Copy link

@mrmaninew mrmaninew commented Apr 6, 2017

great worked like charm

@FilipIlievski

This comment has been minimized.

Copy link

@FilipIlievski FilipIlievski commented Apr 9, 2017

+1

@rsimsek

This comment has been minimized.

Copy link

@rsimsek rsimsek commented Apr 11, 2017

+1

@castlemaninc

This comment has been minimized.

Copy link

@castlemaninc castlemaninc commented Apr 14, 2017

Thanks.

@Ankiewicz

This comment has been minimized.

Copy link

@Ankiewicz Ankiewicz commented Apr 15, 2017

+1

@emmahawk

This comment has been minimized.

Copy link

@emmahawk emmahawk commented Apr 16, 2017

+1 thank you!

@0xAshish

This comment has been minimized.

Copy link

@0xAshish 0xAshish commented Apr 18, 2017

+1

@vincecampanale

This comment has been minimized.

Copy link

@vincecampanale vincecampanale commented Apr 18, 2017

+1 Right on! Thanks.

@rottenoats

This comment has been minimized.

Copy link

@rottenoats rottenoats commented Apr 18, 2017

+1

@thorleifjaocbsen

This comment has been minimized.

Copy link

@thorleifjaocbsen thorleifjaocbsen commented Apr 21, 2017

+1

@Sleavely

This comment has been minimized.

Copy link

@Sleavely Sleavely commented Apr 25, 2017

Will this also remove the committed code from the internal history in Git? If the node_modules directory is 200MB I don't want that to be downloaded every time a team member clones the repository.

@jon-atto-bennett

This comment has been minimized.

Copy link

@jon-atto-bennett jon-atto-bennett commented May 6, 2017

+1

@velevtzvetlin

This comment has been minimized.

Copy link

@velevtzvetlin velevtzvetlin commented May 8, 2017

+1

@kepoly

This comment has been minimized.

Copy link

@kepoly kepoly commented May 15, 2017

+1

bower_components
node_modules
vendor
.idea
etc...

This also works for any of the above.

@TudorTacal

This comment has been minimized.

Copy link

@TudorTacal TudorTacal commented May 15, 2017

+1

@emalherbi

This comment has been minimized.

Copy link

@emalherbi emalherbi commented May 24, 2017

πŸ‘

@artistwhocodes

This comment has been minimized.

Copy link

@artistwhocodes artistwhocodes commented May 28, 2017

+1

@mstorino

This comment has been minimized.

Copy link

@mstorino mstorino commented May 28, 2017

Thanks!

@ValBerthe

This comment has been minimized.

Copy link

@ValBerthe ValBerthe commented Jun 2, 2017

πŸ‘

@marcelocbf

This comment has been minimized.

Copy link

@marcelocbf marcelocbf commented Jun 3, 2017

+1

@sadikie

This comment has been minimized.

Copy link

@sadikie sadikie commented Jun 6, 2017

+1

@jvinhit

This comment has been minimized.

Copy link

@jvinhit jvinhit commented Jun 10, 2017

+1
i have error message:
fatal: pathspec 'node_modules' did not match any files

@mikecargal

This comment has been minimized.

Copy link

@mikecargal mikecargal commented Jun 13, 2017

@jvinhit I'm getting the sam error message

@shaiwilson

This comment has been minimized.

Copy link

@shaiwilson shaiwilson commented Jun 13, 2017

+1

@Joel-hanson

This comment has been minimized.

Copy link

@Joel-hanson Joel-hanson commented Jun 23, 2017

+1

@gnzg

This comment has been minimized.

Copy link

@gnzg gnzg commented Jun 28, 2017

+1

@brijendra98

This comment has been minimized.

Copy link

@brijendra98 brijendra98 commented Jul 5, 2017

+1
Thanks a lot!

@maffsojah

This comment has been minimized.

Copy link

@maffsojah maffsojah commented Jul 7, 2017

+1
Thank you

@rswamy

This comment has been minimized.

Copy link

@rswamy rswamy commented Jul 18, 2017

+1

@byjpr

This comment has been minimized.

Copy link

@byjpr byjpr commented Jul 19, 2017

+1

@abooayoob

This comment has been minimized.

Copy link

@abooayoob abooayoob commented Jul 25, 2017

πŸ‘ Thanks! Keep it here forever πŸ˜„

@theSiberman

This comment has been minimized.

Copy link

@theSiberman theSiberman commented Jul 26, 2017

+1
Cheers

@phsantiago

This comment has been minimized.

Copy link

@phsantiago phsantiago commented Jul 26, 2017

+1 tks

@direwolf424

This comment has been minimized.

Copy link

@direwolf424 direwolf424 commented Aug 3, 2017

+1
Cheers

@aziz-boudi4

This comment has been minimized.

Copy link

@aziz-boudi4 aziz-boudi4 commented Aug 6, 2017

+1

@mistalaba

This comment has been minimized.

Copy link

@mistalaba mistalaba commented Aug 7, 2017

Thank you thank you thank you!

@minhnhatspk

This comment has been minimized.

Copy link

@minhnhatspk minhnhatspk commented Aug 11, 2017

thank you !

@kevinjanada

This comment has been minimized.

Copy link

@kevinjanada kevinjanada commented Aug 16, 2017

+1

@mlightvn

This comment has been minimized.

Copy link

@mlightvn mlightvn commented Aug 18, 2017

Thank you! (Y)

@BabyLizzy-FunTime-Lab

This comment has been minimized.

Copy link

@BabyLizzy-FunTime-Lab BabyLizzy-FunTime-Lab commented Aug 23, 2017

Thank you Paul!

@andrewsouthard1

This comment has been minimized.

Copy link

@andrewsouthard1 andrewsouthard1 commented Aug 24, 2017

+1

@MikeAlbo

This comment has been minimized.

Copy link

@MikeAlbo MikeAlbo commented Aug 27, 2017

Thanks!

@isanjosgon

This comment has been minimized.

Copy link

@isanjosgon isanjosgon commented Aug 29, 2017

+1

@indefinitelee

This comment has been minimized.

Copy link

@indefinitelee indefinitelee commented Aug 29, 2017

thanks!

@EthraZa

This comment has been minimized.

Copy link

@EthraZa EthraZa commented Aug 30, 2017

+1

@lvidarte

This comment has been minimized.

Copy link

@lvidarte lvidarte commented Sep 3, 2017

+1

@kathrynherod

This comment has been minimized.

Copy link

@kathrynherod kathrynherod commented Sep 7, 2017

thank you!

@iroshanAV

This comment has been minimized.

Copy link

@iroshanAV iroshanAV commented Sep 9, 2017

Superb bro :)

@jkoskine

This comment has been minimized.

Copy link

@jkoskine jkoskine commented Sep 10, 2017

Nice one! +1

@saikiran-siriki

This comment has been minimized.

Copy link

@saikiran-siriki saikiran-siriki commented Sep 11, 2017

+1 :)

@klaveren

This comment has been minimized.

Copy link

@klaveren klaveren commented Sep 12, 2017

+1 \o/

@josefaidt

This comment has been minimized.

Copy link

@josefaidt josefaidt commented Sep 13, 2017

+1

@gabrielgugelmin

This comment has been minimized.

Copy link

@gabrielgugelmin gabrielgugelmin commented Sep 14, 2017

+1

@jasminepkim

This comment has been minimized.

Copy link

@jasminepkim jasminepkim commented Sep 17, 2017

thank you!

@aduwillie

This comment has been minimized.

Copy link

@aduwillie aduwillie commented Sep 17, 2017

+1

@ibjhb

This comment has been minimized.

Copy link

@ibjhb ibjhb commented Sep 20, 2017

+1

@harrywynnwill

This comment has been minimized.

Copy link

@harrywynnwill harrywynnwill commented Sep 30, 2017

+1

@indrapermana

This comment has been minimized.

Copy link

@indrapermana indrapermana commented Oct 2, 2017

+1

@baj9032

This comment has been minimized.

Copy link

@baj9032 baj9032 commented Oct 6, 2017

+1

@owezzy

This comment has been minimized.

Copy link

@owezzy owezzy commented Oct 6, 2017

+1_2

@amandasaffer

This comment has been minimized.

Copy link

@amandasaffer amandasaffer commented Oct 6, 2017

+1

@Pragistyo

This comment has been minimized.

Copy link

@Pragistyo Pragistyo commented Oct 17, 2017

+1

@jeremiah-ang

This comment has been minimized.

Copy link

@jeremiah-ang jeremiah-ang commented Oct 20, 2017

+1

@sordonia120446

This comment has been minimized.

Copy link

@sordonia120446 sordonia120446 commented Oct 23, 2017

+1

@kuldipem

This comment has been minimized.

Copy link

@kuldipem kuldipem commented Oct 24, 2017

+1

@squillace91

This comment has been minimized.

Copy link

@squillace91 squillace91 commented Oct 24, 2017

+1

@ndickiso

This comment has been minimized.

Copy link

@ndickiso ndickiso commented Oct 25, 2017

+1

@RafalSpl

This comment has been minimized.

Copy link

@RafalSpl RafalSpl commented Nov 4, 2017

+1

@rduan

This comment has been minimized.

Copy link

@rduan rduan commented Nov 12, 2017

+1

@qymspace

This comment has been minimized.

Copy link

@qymspace qymspace commented Nov 13, 2017

+1

@ecojuntak

This comment has been minimized.

Copy link

@ecojuntak ecojuntak commented Nov 14, 2017

+1

@Gurenax

This comment has been minimized.

Copy link

@Gurenax Gurenax commented Nov 17, 2017

Thank you

@mwanjajoel

This comment has been minimized.

Copy link

@mwanjajoel mwanjajoel commented Nov 18, 2017

Awesome! Thanks

@JuliaArt

This comment has been minimized.

Copy link

@JuliaArt JuliaArt commented Nov 23, 2017

Thanks!

@janpauldahlke

This comment has been minimized.

Copy link

@janpauldahlke janpauldahlke commented Nov 25, 2017

a long list of +1, consider me in. +1

@alhilali

This comment has been minimized.

Copy link

@alhilali alhilali commented Nov 30, 2017

+1

@ashishpandey001

This comment has been minimized.

Copy link

@ashishpandey001