https://github.com/0xdsaini/rgc
rgc: risky-git-command. Even ran a git command only to end up with a messy git repository. Not anymore, rgc allows you to undo git commands.
https://github.com/0xdsaini/rgc
bash git github linux script shell
Last synced: 1 day ago
JSON representation
rgc: risky-git-command. Even ran a git command only to end up with a messy git repository. Not anymore, rgc allows you to undo git commands.
- Host: GitHub
- URL: https://github.com/0xdsaini/rgc
- Owner: 0xdsaini
- Created: 2024-07-11T11:29:43.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-07-14T17:42:09.000Z (over 1 year ago)
- Last Synced: 2024-07-15T07:46:30.970Z (over 1 year ago)
- Topics: bash, git, github, linux, script, shell
- Language: Shell
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Authors: authors.txt
Awesome Lists containing this project
README
## Overview
The idea is simple. It uses `hg` (mercurial) under the hood to version control git's internal files.
## Requirements:
`apt-get install mercurial`
## Installation:
`dpkg -i build/rgc.deb`
## Usage
`$ rgc do`
`$ `
Messed it?
`$ rgc undo`
## FAQ
**1. Why can't we use copy-paste to just backup?**
**Ans.** Copy-paste can be a bit too much, it forces you to decide and keep track of folders manually, a mental overload. There is a reason why internet is still filled with users with post-messed repo help posts. `rgc` can be a pleasure.
**2. Why not use copy-paste internally?**
**Ans.** We planned to implement `rgc redo` so copy-paste won't cut it. Also, `rgc undo 2`, `rgc undo 3`... But we don't want to make it complicated so `rgc undo ` is highly unlikely to happen.
**3. Why not use git under the hood too instead of hg?**
**Ans.** Originally, the idea was to initialize a `.git` repo in parent directory but then git(in parent-dir) was considering inside .git repo as submodule and left no way to track internal files of inner `.git` repo. Have been using `hg` since then. Can change to `git` in newer versions once it is found git can work with another git repo inside, the way we want. For now, `hg` is fitting the bill very well.
## Caution/Bug:
Changes never added to git, and untracked/ignored files are still at risk of deletion. This is a fatal bug. Please check issue: https://github.com/0xdsaini/rgc/issues/1 and proceed with caution.