Skip to content

Instantly share code, notes, and snippets.

@bleach
Created February 14, 2019 16:10
Show Gist options
  • Save bleach/1e06904fbe1251693cce4dd0fc292a77 to your computer and use it in GitHub Desktop.
Save bleach/1e06904fbe1251693cce4dd0fc292a77 to your computer and use it in GitHub Desktop.
$ mkdir git-example
$ cd git-example
$ git init
Initialized empty Git repository in /Users/grahambleach/git-example/.git/
$ echo "This is a test repo" > README
$ git add README
$ git commit
[master (root-commit) b8fd413] This is a test
1 file changed, 1 insertion(+)
create mode 100644 README
$ echo 'Oh no, it is not!' >> README
$ git add README
$ git commit
[master dfd464c] Dummy
1 file changed, 1 insertion(+)
$ git revert dfd464c
[master 887e21f] Revert "Dummy"
1 file changed, 1 deletion(-)
$ cat README
This is a test repo
$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment