Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

create gitignore

# creates gitignore file
$ touch .gitignore
Comment

make a global .gitignore file

#Windows:
#Run this in cmd:
git config --global core.excludesFile "%USERPROFILE%.gitignore" && notepad "%USERPROFILE%.gitignore"

#Notepad will open, press yes to the prompt to make a new file.
#Any changes made to this file will work immediately for all repos.

## This makes both a ".gitconfig" and a ".gitignore" file in %USERPROFILE%
## The ".gitconfig" file is required for the ".gitignore" file to work.
Comment

create gitignore

# Automatically create .gitignore file for a project. Copy in your .gitignore file
https://www.toptal.com/developers/gitignore
Comment

create gitignore files

#Linux
$ touch .gitignore

#Windows
cd c:<your path>
notepad .gitignore
#Accept the prompt to create the file, edit the contents accordingly, save and close.
Comment

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

create .gitignore

point your browser to 

gitignore.io 

and select all the tools and technologies you are using. 
You will automatically have a generated .gitignore file.
Comment

how to generate a .gitignore

echo "function gi() { curl -L -s https://www.gitignore.io/api/$@ ;}" >> ~/.bash_profile && source ~/.bash_profile
Comment

how to make .gitignore

# Open git bash in the directory you wanna create .gitignore
# run command:
$ touch .gitignore
# there you go
Comment

how to setup a gitignore

### Terraform ###
# Local .terraform directories
**/.terraform/*

# .tfstate files
*.tfstate

# Crash log files
crash.log

# Ignore any .tfvars files that are generated automatically for each Terraform run. Most
# .tfvars files are managed as part of configuration and so should be included in
# version control.
#
# example.tfvars

# Ignore override files as they are usually used to override resources locally and so
# are not checked in
override.tf
override.tf.json
*_override.tf
*_override.tf.json

# Include override files you do wish to add to version control using negated pattern
# !example_override.tf

# Include tfplan files to ignore the plan output of command: terraform plan -out=tfplan
# example: *tfplan*

# End of https://www.toptal.com/developers/gitignore/api/terraform
Comment

PREVIOUS NEXT
Code Example
Shell :: how to activate conda/Anaconda environment 
Shell :: linux -ltr 
Shell :: print next 10 lines after grep 
Shell :: bash substitution 
Shell :: basic git commands 
Shell :: how to move git clone to another git repo 
Shell :: command to find out my git head version 
Shell :: diskpart 
Shell :: copying folders in git bash 
Shell :: mac terminal wifi commands 
Shell :: install deno 
Shell :: insert image into github wiki 
Shell :: git rebase a local branch into my branch 
Shell :: ubuntu path of saving screenshots 
Shell :: how to get specific lines of shell output 
Shell :: kubectl logs with grep 
Shell :: how to sudo pip permission denied 
Shell :: sed mac install 
Shell :: git clone into path 
Shell :: how to unrar multiple files at once linux 
Shell :: count file linux 
Shell :: how to push your code to github 
Shell :: how to save curl output to a file 
Shell :: copying directories in linux 
Shell :: python re.sub examples 
Shell :: docker repository 
Shell :: install virtualbox 
Shell :: Set Up Your Username and Email in Git Command 
Shell :: add gist file to dev.to 
Shell :: bash split pipe output by delimiter 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =