Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

gitignore

When publishing your project's source code to the internet,
consider using a gitignore file.
A gitignore file tells Git which files to ignore.

Using gitignore:
1. Create a file named ".gitignore"
2. Enter file names for files you want to keep private.
	Ex:
    node_modules
	.DS_Store
	.env

For a comphrensive guide and advanced usage such as pattern matching,
visit https://www.pluralsight.com/guides/how-to-use-gitignore-file
Comment

.gitignore

node_modules
.DS_Store
.env
Comment

.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

gitignore

Use the service www.gitignore.io to create your personalized .gitignore
Comment

Gitignore

Use this link as a generator for your gitignore: "https://www.toptal.com/developers/gitignore"
Just enter your language/IDE and press tab if you want to add another one. 
Once your done with that press "Create" and copy the text into your gitignore
Comment

.gitignore

// Example of .gitignore file
.env
config.json
node_modules
// A .gitignore file is supposed to ignore any files when commiting to github with git
Comment

!.gitignore

    $ cat .gitignore
    vmlinux*
    $ ls arch/foo/kernel/vm*
    arch/foo/kernel/vmlinux.lds.S
    $ echo '!/vmlinux*' >arch/foo/kernel/.gitignore
Comment

.gitignore file

# Created by https://www.toptal.com/developers/gitignore/api/macos,intellij,java
# Edit at https://www.toptal.com/developers/gitignore?templates=macos,intellij,java

### Intellij ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf

# AWS User-specific
.idea/**/aws.xml

# Generated files
.idea/**/contentModel.xml

# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml

# Gradle
.idea/**/gradle.xml
.idea/**/libraries

# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn.  Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr

# CMake
cmake-build-*/

# Mongo Explorer plugin
.idea/**/mongoSettings.xml

# File-based project format
*.iws

# IntelliJ
out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Cursive Clojure plugin
.idea/replstate.xml

# SonarLint plugin
.idea/sonarlint/

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

# Editor-based Rest Client
.idea/httpRequests

# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser

### Intellij Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

# Sonarlint plugin
# https://plugins.jetbrains.com/plugin/7973-sonarlint
.idea/**/sonarlint/

# SonarQube Plugin
# https://plugins.jetbrains.com/plugin/7238-sonarqube-community-plugin
.idea/**/sonarIssues.xml

# Markdown Navigator plugin
# https://plugins.jetbrains.com/plugin/7896-markdown-navigator-enhanced
.idea/**/markdown-navigator.xml
.idea/**/markdown-navigator-enh.xml
.idea/**/markdown-navigator/

# Cache file creation bug
# See https://youtrack.jetbrains.com/issue/JBR-2257
.idea/$CACHE_FILE$

# CodeStream plugin
# https://plugins.jetbrains.com/plugin/12206-codestream
.idea/codestream.xml

### Java ###
# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

### macOS ###
# General
.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two 
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

# End of https://www.toptal.com/developers/gitignore/api/macos,intellij,java
Comment

gitignore

Create a file named ".gitignore" on the outer most place of your project
add the file or folder names you want git to ignore before pushing.
Example- node_modules
Comment

gitignore

# you might want to hide all the files, this helps if you don't want '.gitignore' showing up in your repo
https://luisdalmolin.dev/blog/ignoring-files-in-git-without-gitignore/#:~:text=To%20ignore%20untracked%20files%2C%20you,tracking%20any%20(untracked)%20file.

# in terminal within the project directory
open .git/info/exclude 

# file opens as below with example

# git ls-files --others --exclude-from=.git/info/exclude
# Lines that start with '#' are comments.
# For a project mostly in C, the following would be a good set of
# exclude patterns (uncomment them if you want to use them):
# *.[oa]
# *~
example-1.py
example-2.py
example-3.py
example-4.py

# when you use: git add .
# example 1 to 4 files will be ignored
Comment

.gitignore

*.log
build/
temp-*
Comment

PREVIOUS NEXT
Code Example
Shell :: remove all branches deleted on remote 
Shell :: remove last commit 
Shell :: big sur ERROR: Error installing ffi: ERROR: Failed to build gem native extension. 
Shell :: git template fetch 
Shell :: angular cli disable auto reload 
Shell :: install neovim mac 
Shell :: cp linux command with progress bar 
Shell :: create directory linux 
Shell :: yarn version in mac 
Shell :: how to uncommit the last commit in git 
Shell :: run mongodb locally 
Shell :: beyond compare mac using brew 
Shell :: see what groups a user is in linux 
Shell :: docker-compose command multiple 
Shell :: how to see staged files in git 
Shell :: wsl2 settings 
Shell :: tcpdump listen url 
Shell :: start beef kali linux 
Shell :: Problem binding to port 80: Could not bind to IPv4 or IPv6. 
Shell :: windows start service 
Shell :: new ssh key github 
Shell :: mkdir powershell 
Shell :: push the project to github 
Shell :: ruby install for mac 
Shell :: mac see current path7 
Shell :: zsh: permission denied: ./manage.py for django projects 
Shell :: configure static ip address linux 
Shell :: git create a new repository 
Shell :: minishift admin-user addon 
Shell :: brew update package 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =