Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/spenserblack/gh-template-overwrite
Overwrite your current files with the contents from a template repository
https://github.com/spenserblack/gh-template-overwrite
extension gh-extension github github-cli
Last synced: about 1 month ago
JSON representation
Overwrite your current files with the contents from a template repository
- Host: GitHub
- URL: https://github.com/spenserblack/gh-template-overwrite
- Owner: spenserblack
- Created: 2022-08-01T16:05:48.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-08-01T17:52:35.000Z (over 2 years ago)
- Last Synced: 2024-08-22T13:17:45.766Z (3 months ago)
- Topics: extension, gh-extension, github, github-cli
- Language: Shell
- Homepage:
- Size: 9.77 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# `gh template-overwrite`
This extension will overwrite your *current files* with the contents from a
template repository:warning: This will *not* commit any changes. Review the tracked changes before
committing.## Why?
My use case was that I wanted to do a major change to the implementation of an
existing project, and wanted to use a template repository to ease the initial
setup of the new implementation.## Usage
```bash
git checkout -b refactor/new-implementation
gh template-overwrite /
git commit -m "Initial commit of new implementation"
```## How it works
This extension creates a remote repository called `template`. It fetches
`template` and gets its default branch from the API, untracks the
current files, and does `git checkout template/ -- .`.