Skip to content

Commit

Permalink
Put the output into the README.
Browse files Browse the repository at this point in the history
  • Loading branch information
YtvwlD committed Aug 3, 2015
1 parent 84aad13 commit 17f11d0
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,17 @@ Do you regret your changes to a GIT repository sometimes? That's when `git regre

Simply run

sudo make install
$ sudo make install
install -b -v git-regret /usr/lib/git-core/git-regret
'git-regret' -> '/usr/lib/git-core/git-regret'
echo "To remove this, simply run 'make uninstall'."
To remove this, simply run 'make uninstall'.

to install and

sudo make uninstall
$ sudo make uninstall
rm -v /usr/lib/git-core/git-regret
removed '/usr/lib/git-core/git-regret'

to remove it.
The requirements are GIT and Python 3.
Expand All @@ -23,16 +29,21 @@ You have to be in a GIT repository to use `git-regret`.

If you want to delete all changes you have made since the last commit, you would usually execute:

git reset --hard HEAD
$ git reset --hard HEAD
HEAD is now at 61fd781 Test

`git regret` improves this:

git regret --soft
$ git regret --soft
HEAD is now at 61fd781 Test
Deleted all changes since the last commit.

If you want to delete the last commit, but retain all changes, you would usually run:

git reset --soft HEAD^
$ git reset --soft HEAD^

Or you can use `git regret`:

git regret --hard
$ git regret --hard
Deleted the last commit - but not any of the changes. They're still staged.
If you want to delete them, too, please run 'git regret --soft'.

0 comments on commit 17f11d0

Please sign in to comment.