Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/astj/ghq-migrator
https://github.com/astj/ghq-migrator
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/astj/ghq-migrator
- Owner: astj
- Created: 2015-12-11T15:51:34.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2023-01-31T05:46:50.000Z (over 1 year ago)
- Last Synced: 2024-06-28T07:32:51.070Z (3 months ago)
- Language: Shell
- Size: 6.84 KB
- Stars: 23
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ghq-migrator
move your local repository into [ghq](https://github.com/motemen/ghq)'s root directory with suitable URI-based path.
## DEPENDENCIES
- bash
- sed (may not work with GNU's version. Only tested with the BSD version)
- gitAnd you need to set ghq's root directory configuration in 'git-config'. If you already started using ghq, you need to do nothing about it. Read ghq's README.
## SYNOPSIS
```
$ ghq-migrator.bash ./(YOUR_REPOSITORY)/
```## CONFIGURATION
You can customize behavior of ghq-migrator by following environmental variables.
### `GHQ_MIGRATOR_ACTUALLY_RUN`
Unless this variable set to `1`, ghq-migrator doesn't move repository's directory (dry-run).
It's recommended to run ghq-migrator without this option at first, check output, and run with `GHQ_MIGRATOR_ACTUALLY_RUN=1` to move directory actually.### `GHQ_MIGRATOR_PREFER_ORIGIN`
By default, ghq-migrator doesn't move a repository with more than two git-remote url.
If `GHQ_MIGRATOR_PREFER_ORIGIN=1` is set, ghq-migrator moves the repository according to url of `origin` even it has another remote.*Note* : Even if `GHQ_MIGRATOR_PREFER_ORIGIN=1` is specified, ghq-migrator cannot move repositories which its origin has more than 2 urls, because ghq-migrator cannot decide which url to use.
### `GHQ_MIGRATOR_LINK`
If `GHQ_MIGRATOR_LINK=1` is set, a symbolic link to the destination directory will be created at the place where the repository was moved from.
### AUTHOR
astj ([email protected])
### LICENSE
MIT