Skip to content

Instantly share code, notes, and snippets.

@Freeaqingme
Created July 18, 2012 21:26
Show Gist options
  • Save Freeaqingme/3139015 to your computer and use it in GitHub Desktop.
Save Freeaqingme/3139015 to your computer and use it in GitHub Desktop.
dolf@dolf-ThinkPad-T520:~/testgit$ git init
Initialized empty Git repository in /home/dolf/testgit/.git/
dolf@dolf-ThinkPad-T520:~/testgit$ nano readme
dolf@dolf-ThinkPad-T520:~/testgit$ echo foobar > readme
dolf@dolf-ThinkPad-T520:~/testgit$ git add readme
dolf@dolf-ThinkPad-T520:~/testgit$ git commit -m "foobar"
[master (root-commit) b1a97f2] foobar
1 file changed, 1 insertion(+)
create mode 100644 readme
dolf@dolf-ThinkPad-T520:~/testgit$ echo "foo bar" > readme
dolf@dolf-ThinkPad-T520:~/testgit$ git commit -m "foo bar"
# 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: readme
#
no changes added to commit (use "git add" and/or "git commit -a")
dolf@dolf-ThinkPad-T520:~/testgit$ git commit -am "foo bar"
[master f79c2c7] foo bar
1 file changed, 1 insertion(+), 1 deletion(-)
dolf@dolf-ThinkPad-T520:~/testgit$ git mv readme readme.txt
dolf@dolf-ThinkPad-T520:~/testgit$ git commit -am "txt"
[master b5934d8] txt
1 file changed, 0 insertions(+), 0 deletions(-)
rename readme => readme.txt (100%)
dolf@dolf-ThinkPad-T520:~/testgit$ git log readme.txt
commit b5934d809b7964ddd49d697343aec037e8db5bf6
Author: Dolf Schimmel (Freeaqingme) <dolfschimmel@gmail.com>
Date: Wed Jul 18 23:25:20 2012 +0200
txt
dolf@dolf-ThinkPad-T520:~/testgit$ git blame readme.txt
f79c2c72 readme (Dolf Schimmel (Freeaqingme) 2012-07-18 23:25:06 +0200 1) foo bar
dolf@dolf-ThinkPad-T520:~/testgit$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment