Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jeremywrnr/git-reclone

reclone your git repo
https://github.com/jeremywrnr/git-reclone

clone gem git ruby

Last synced: 4 months ago
JSON representation

reclone your git repo

Awesome Lists containing this project

README

        

# git-reclone :rocket:

[![Gem Version](https://badge.fury.io/rb/git-reclone.svg)](https://badge.fury.io/rb/git-reclone)
[![Build Status](https://app.travis-ci.com/jeremywrnr/git-reclone.svg)](https://app.travis-ci.com/github/jeremywrnr/git-reclone)
[![MIT](https://img.shields.io/npm/l/alt.svg?style=flat)](http://jeremywrnr.com/mit-license)

destroy your local copy of a git repo, and reclone it from your remote.

![Screencast](http://i.imgur.com/HIvZCJB.gif)

tested and works well for:

- github
- bitbucket

## setup

[sudo] gem install git-reclone

This will enable the `git reclone` command automatically!

## usage

git reclone

reclones from the first git remote. to clone a specific remote, specify some
part (or all) of the host name. for example:

git reclone bit
git reclone bucket
git reclone bitbucket

will all overwrite the current repository with bitbucket's remote (assuming
that some other host/repo name doesn't also match 'bitbucket').

## about

sometimes i mess up git histories, with (merges or rebasing, etc), and it
becomes more of a headache to figure out how to undo what i did than to just
reclone the remote copy and apply the changes i want in the right way. i was
doing this often enough that i figured it would be nice to have a tool that
just did this automatically. besides, it can be satisfying to just reclone your
local copy and start anew - after all, what are backups meant for?

## testing

bundle || gem install bundler && bundle
rake # running git-reclone's tests