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

git exclude folder

directory_to_exclude/
Comment

how to exclude .ide directory in gitignore

# Ignore the node_modules directory
node_modules/

# Ignore Logs
logs
*.log

# Ignore the build directory
/dist

# The file containing environment variables 
.env

# Ignore IDE specific files
.idea/
.vscode/
*.sw*
Comment

PREVIOUS NEXT
Code Example
Shell :: update database syntaxn using nuget package 
Shell :: update ruby version ubuntu 
Shell :: centos curl command 
Shell :: gitlab runner npm command not found 
Shell :: import single table from mysql dump 
Shell :: download terraform for mac 
Shell :: gitignore is not working 
Shell :: raspberry pi headless 
Shell :: docker compose stdin_open 
Shell :: oh my zsh git 
Shell :: enable option in ubuntu to create document on right click 
Shell :: add branch to bash-prompt 
Shell :: download pdf arranger ubuntu 
Shell :: open video linux terminal 
Shell :: change group ownership linux 
Shell :: setup git on windows 
Shell :: fedora simplescreenrecorder start 
Shell :: vim cut paste 
Shell :: install neovim 7 in ubuntu 
Shell :: untrack lfs file 
Shell :: ubuntu default terminal font family 
Shell :: npm install bootstrap 3 angular 
Shell :: am i ~/.zshrc or ~/.bashrc 
Shell :: uninstall yarn 
Shell :: my terminator does not working properly 
Shell :: phpinfo cli 
Shell :: install just linux 
Shell :: install node in nvm 
Shell :: linux shard a file into smaller files 
Shell :: docker compose limit logs 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =