-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Description
I'm following the readme to create new commits in a repo. It works well but changes are still present after the commit.
$ mkdir repo
$ git init
Initialized empty Git repository in /./repo/.git/
$ touch file
$ git add file
$ git commit -m "init" file
$ cd ..
$ iex -S mix
iex(1)> r = Gitex.Git.open("repo")
%Gitex.Git{home_dir: "repo/.git", user: nil}
iex(2)> Gitex.get("master", r) |> Gitex.put(r, "repo/file", "foo") |> Gitex.commit(r, "master", "foo")
"d12333819597c14024cc84d9adb775c20a3ad265"
$ cd repo
$ git log
commit d12333819597c14024cc84d9adb775c20a3ad265
Author: anonymous <anonymous@localhost>
Date: Thu Dec 22 12:51:47 2016 +0100
foo
commit 53dd7932d470e2dd93fedfcb45853a0b4dcfeb48
Author: Jean-Philippe Braun <eon@patapon.info>
Date: Thu Dec 22 12:51:22 2016 +0100
init
$ git show d12333819597c14024cc84d9adb775c20a3ad265
commit d12333819597c14024cc84d9adb775c20a3ad265
Author: anonymous <anonymous@localhost>
Date: Thu Dec 22 12:51:47 2016 +0100
foo
diff --git a/repo/file b/repo/file
new file mode 100755
index 0000000..1910281
--- /dev/null
+++ b/repo/file
@@ -0,0 +1 @@
+foo
\ No newline at end of file
$ git status
On branch master
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
deleted: repo/file
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels