Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

git status not clean after commit #5

Open
eonpatapon opened this issue Dec 22, 2016 · 0 comments
Open

git status not clean after commit #5

eonpatapon opened this issue Dec 22, 2016 · 0 comments

Comments

@eonpatapon
Copy link

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 <[email protected]>
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant