Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to use gitignore to ignore a folder

You can ignore entire directories, just by including their paths and putting a / on the end:

1
2
node_modules/
logs/
Comment

gitignore folder

in .gitignore:
	folder/
Comment

gitignore exclude folder

# Ignore all directories, and all sub-directories, and it's contents:
*/*

#Now ignore all files in the current directory 
#(This fails to ignore files without a ".", for example 
#'file.txt' works, but 
#'file' doesn't):
*.*

#Only Include these specific directories and subdirectories:
!wordpress/
!wordpress/*/
!wordpress/*/wp-content/
!wordpress/*/wp-content/themes/
!wordpress/*/wp-content/themes/*
!wordpress/*/wp-content/themes/*/*
!wordpress/*/wp-content/themes/*/*/*
!wordpress/*/wp-content/themes/*/*/*/*
!wordpress/*/wp-content/themes/*/*/*/*/*
Comment

PREVIOUS NEXT
Code Example
Shell :: install redash ubuntu 20.04 
Shell :: git bash posh git 
Shell :: install docker-compose in centos 8 
Shell :: install webstorm ubuntu 20.04 
Shell :: change default php alternatives 
Shell :: git lines added and removed by author 
Shell :: -bash: docker: command not found mac 
Shell :: how to remove amplify from system globally 
Shell :: create virtual environment ubuntu 
Shell :: bash script command not found 
Shell :: create permanent git credentials windows 
Shell :: pm2 status 
Shell :: install openssl ubuntu 
Shell :: github git init main 
Shell :: how to untrack a file in git 
Shell :: conda command to install folium 
Shell :: bash grep for two terms in same line 
Shell :: git convert to crlf 
Shell :: sh increment variable 
Shell :: git aliases 
Shell :: grep without match 
Shell :: git how to roll back to a commit 
Shell :: linux samba service 
Shell :: git pull --tags origin main remote: Repository not found. 
Shell :: bash check if string in file 
Shell :: Find last digit of a number in c# 
Shell :: post webhook bash 
Shell :: express js 
Shell :: git history 
Shell :: angular cli interface generate 
ADD CONTENT
Topic
Content
Source link
Name
4+3 =