0.0
No commit activity in last 3 years
No release in over 3 years
Create a non-bare remote ready to accept pushes for deployment
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 1.13
~> 10.0

Runtime

 Project Readme

git make-mirror

git-make_mirror is a utility for easily creating non-bare pushable remotes. This is very useful for creating deployment endpoints.

Installation

gem install git-make_mirror

Usage

git make-mirror [options] <remote_name>

For example the following will create a empty repository on the host given, and set the options so that it can be pushed to, even though it is not bare. A post-receive hook will reset the working directory to HEAD after every push.

git make-mirror reednj@twtxt.xyz:code/hello.git

When running the command from a git repository, the -p option will immediately push the current repository to the remote.

# will immediately push the current repo into hello.git
git make-mirror -p reednj@twtxt.xyz:code/hello.git

The -r option will add the remote to the current repository with the provided name.

# after running the repository will have the new remote 'prod'
git make-mirror -r prod reednj@twtxt.xyz:code/hello.git

License

The gem is available as open source under the terms of the MIT License.