Skip to content

Instantly share code, notes, and snippets.

@andreaja
Created April 3, 2021 18:43
Show Gist options
  • Save andreaja/c2a07ecc6cc5bb332a198fd2cc78c8e8 to your computer and use it in GitHub Desktop.
Save andreaja/c2a07ecc6cc5bb332a198fd2cc78c8e8 to your computer and use it in GitHub Desktop.
andreaja~/Temp$ mkdir gitignore-test
andreaja~/Temp$ cd gitignore-test/
andreaja~/Temp/gitignore-test$ git init
Initialized empty Git repository in /Users/andreaja/Temp/gitignore-test/.git/
andreaja(git)gitignore-test[master]/$ echo "Debug/" >> .gitignore
andreaja(git)gitignore-test[master]/$ git add .gitignore
andreaja(git)gitignore-test[master]/$ commit -m "Initial import"
[master (root-commit) 266f919] Initial import
1 file changed, 1 insertion(+)
create mode 100644 .gitignore
andreaja(git)gitignore-test[master]/$ mkdir Debug
andreaja(git)gitignore-test[master]/$ mkdir -p tmp/Debug
andreaja(git)gitignore-test[master]/$ touch Debug/foo
andreaja(git)gitignore-test[master]/$ touch tmp/Debug/foo
andreaja(git)gitignore-test[master]/$ git status
On branch master
nothing to commit, working tree clean
andreaja(git)gitignore-test[master]/$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment