Skip to content
Synchronize your working directory efficiently to a remote place without committing the changes.
Branch: master
Clone or download
Latest commit 5b0acc2 May 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cmd Switch to go modules May 13, 2019
examples Add license to argo example May 18, 2019
pkg Switch to go modules May 13, 2019
scripts/license Remove pycache Apr 11, 2019
test
.dockerignore Add .dockerignore Feb 12, 2019
.gitignore Update gitignore Apr 11, 2019
.travis.yml Fix CI May 13, 2019
DEPENDENCIES.md Add dependency license list Apr 4, 2019
Dockerfile Update volumes May 8, 2019
LICENSE Add license to the repo Apr 3, 2019
Makefile
README.md Update README for brew installation Apr 12, 2019
SPEC.md Create SPEC.md Jan 27, 2019
VERSION Bump version to v0.1.2 May 13, 2019
go.mod Switch to go modules May 13, 2019
go.sum Switch to go modules May 13, 2019
golangci.yml Use golangci-lint instead of gometalinter Apr 2, 2019
main.go Switch to go modules May 13, 2019

README.md

git-ghost

GoDoc Build Status Coverage Status

Git Ghost is a command line tool for synchronizing your working directory efficiently to a remote place without commiting changes.

Concept

Git Ghost creates 2 types of branches to synchronize your working directory.

Commits Branch

This type of branch contains commits between 2 commits which can exist only in your working directory.

Diff Branch

This type of branch contains modifications from a specific commit in your working directory.

Installing

From Source

Install the binary from source: execute,

$ git clone https://github.com/pfnet-research/git-ghost
$ cd git-ghost
$ make install

Using Homebrew

$ brew tap pfnet-research/git-ghost
$ brew install git-ghost

Releases

The binaries of each releases are available in Releases.

Getting Started

First, create an empty repository which can be accessible from a remote place. Set the URL as GIT_GHOST_REPO env.

Assume your have a local working directory DIR_L and a remote directory to be synchronized DIR_R.

Case 1 (DIR_L HEAD == DIR_R HEAD)

You can synchoronize local modifications.

$ cd <DIR_L>
$ git-ghost push
<HASH>
$ git-ghost show <HASH>
...
$ cd <DIR_R>
$ git-ghost pull <HASH>

Case 2 (DIR_L HEAD > DIR_R HEAD)

You can synchronize local commits and modifications.

Assume DIR_R's HEAD is HASH_R.

$ cd <DIR_L>
$ git-ghost push all <HASH_R>
<HASH_1> <HASH_2>
<HASH_3>
$ git-ghost show all <HASH_2> <HASH_3>
...
$ cd <DIR_R>
$ git-ghost pull all <HASH_2> <HASH_3>

Development

# checkout this repo to $GOPATH/src/git-ghost
$ cd $GOPATH/src
$ git clone git@github.com:pfnet-research/git-ghost.git
$ cd git-ghost

# build
$ make build

# see godoc
$ go get golang.org/x/tools/cmd/godoc
$ godoc -http=:6060  # access http://localhost:6060 in browser

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Copyright

Copyright (c) 2019 Preferred Networks. See LICENSE for details.

You can’t perform that action at this time.