Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
stpch committed Aug 23, 2018
1 parent 6aee02e commit d9e180d
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# git-post-commit-dummy

A Git `post-commit` hook that keeps your GitHub commit graph intact.
A Git `post-commit` hook that keeps your GitHub (or other) commit graph intact.

Saves all commits to non-owned repositories to your own repository as dummy commit (commit without changes), so you don't lose the commits when removed from the project or organization.
Saves all commits to non-owned repositories to your own repository as dummy
commit (commit without changes), so you don't lose the commits when removed from
the project or organization.

Dummy commit messages have the following format:

Expand All @@ -14,13 +16,17 @@ https://url-to-non-owned-repository

## Installation

1. Create a new repository (e.g. `git-history`) that will be used as dummy commit target
1. Create a new repository (e.g. `git-history`) that will be used as dummy
commit target
2. Clone the repository to your local machine and note its path
3. Download [post-commit](post-commit) and set `GITHUB_ACCOUNT_URL` and `DUMMY_COMMIT_REPOSITORY`
3. Download [post-commit](post-commit) and set `OWNED_REMOTE_URL_PREFIX` and
`DUMMY_COMMIT_REPOSITORY_PATH`
4. Make `post-commit` executable by running `chmod +x post-commit`
5. Copy `post-commit` to a project's `.git/hooks` directory to have it save dummy commits
5. Copy `post-commit` to a project's `.git/hooks` directory to have it save
dummy commits

## Check that it works

1. Create a local commit for a project with `post-commit` installed
2. Check that your dummy commit repository (e.g. `git-history`) received the dummy commit
2. Check that your dummy commit repository (e.g. `git-history`) received the
dummy commit

0 comments on commit d9e180d

Please sign in to comment.