Skip to content

Instantly share code, notes, and snippets.

@douglasjacobsen
Created January 17, 2017 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save douglasjacobsen/53511ab16100f7d34ccd86f1d807eb77 to your computer and use it in GitHub Desktop.
Save douglasjacobsen/53511ab16100f7d34ccd86f1d807eb77 to your computer and use it in GitHub Desktop.
┌─[user][user-mach][/tmp][08:05:56]
└─▪ git init ignore_test
Initialized empty Git repository in /tmp/ignore_test/.git/
┌─[user][user-mach][/tmp][08:05:59]
└─▪ cd ignore_test/
┌─[user][user-mach][/tmp/ignore_test][master #][08:06:00]
└─▪ ls
┌─[user][user-mach][/tmp/ignore_test][master #][08:06:00]
└─▪ touch foo
┌─[user][user-mach][/tmp/ignore_test][master #][08:06:04]
└─▪ touch bar
┌─[user][user-mach][/tmp/ignore_test][master #][08:06:06]
└─▪ echo "bar" .git^C
┌─[user][user-mach][/tmp/ignore_test][master #][08:06:13]
└─▪ git add foo bar
┌─[user][user-mach][/tmp/ignore_test][master #][08:06:15]
└─▪ git commit -a -m "Initial commit"
[master (root-commit) ce08ceb] Initial commit
2 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bar
create mode 100644 foo
┌─[user][user-mach][/tmp/ignore_test][master][08:06:20]
└─▪ echo "bar" > .gitignore
┌─[user][user-mach][/tmp/ignore_test][master][08:06:28]
└─▪ git add .gitignore
┌─[user][user-mach][/tmp/ignore_test][master +][08:06:34]
└─▪ git commit -a -m "Adding ignore for bar file"
[master f2bd03f] Adding ignore for bar file
1 file changed, 1 insertion(+)
create mode 100644 .gitignore
┌─[user][user-mach][/tmp/ignore_test][master][08:06:40]
└─▪ echo "lfdas" >> bar
┌─[user][user-mach][/tmp/ignore_test][master *][08:06:47]
└─▪ git st
On branch master
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: bar
no changes added to commit (use "git add" and/or "git commit -a")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment