Skip to content

Instantly share code, notes, and snippets.

@rstacruz

rstacruz/ag.sh Secret

Created June 18, 2012 04:50
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 rstacruz/ef4af99306276aa31637 to your computer and use it in GitHub Desktop.
Save rstacruz/ef4af99306276aa31637 to your computer and use it in GitHub Desktop.
$ mkdir foo
$ cd foo
$ git init .
Initialized empty Git repository in /Users/rsc/foo/.git/
$ echo hello > readme.txt
$ mkdir logs
$ echo hello > logs/file.log
$ echo "/logs/*.log" > .gitignore
$ git add .
$ git status
# On branch master
#
# Initial commit
#
# Changes to be committed:
# (use "git rm --cached <file>..." to unstage)
#
# new file: .gitignore
# new file: readme.txt
#
$ git commit -m "Test"
[master (root-commit) 18f92b0] Test
2 files changed, 2 insertions(+)
create mode 100644 .gitignore
create mode 100644 readme.txt
$ ag hello
./logs/file.log
1:hello
./readme.txt
1:hello
$ git grep hello
readme.txt:1:hello
$ ag -V
ag version 0.8
$ uname -a
Darwin Arcturus.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386
$ sw_vers
ProductName: Mac OS X
ProductVersion: 10.6.8
BuildVersion: 10K549
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment