Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/crhntr/gitctrl
A CLI to Control Many Git Repositories or many of other git stuffs
https://github.com/crhntr/gitctrl
Last synced: about 2 months ago
JSON representation
A CLI to Control Many Git Repositories or many of other git stuffs
- Host: GitHub
- URL: https://github.com/crhntr/gitctrl
- Owner: crhntr
- Created: 2018-09-30T03:22:40.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-08-02T01:42:58.000Z (over 5 years ago)
- Last Synced: 2023-03-09T05:52:53.311Z (almost 2 years ago)
- Language: Go
- Homepage:
- Size: 14.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# gitctrl
Some Scripts to Control Many Git Repositories## Problems this tool trys to "Solve"
### Updating Remote URLs from HTTPs to SSH
Migrating from using HTTP(S) remote servers to using SSH is a good thing (I guess),
but with many cloned repos going to every directory and running```bash
pushd $SOME_REPO
git remote -v
git remote rm origin
git remote add origin [email protected]:crhntr/gitctrl
popd
```
can take a little time. So I decided to try out a cool looking git library,
[go-git](https://github.com/src-d/go-git), to try to automate this problem.### Viewing the Status of Many Repos
I'm not always the best at remembering to commit and push my work.
I wanted to see what the status of all my repo's were so I could prioritise
finishing WIP and push it. So this tool does this. _Also, I haven't written much
concurent Go recently so after noticing how long some repos took to return a status
I decided this was an opertunity to practice using some go routines._## Usage
### `gitctrl statuses`
Go to some directory and run this command. The tool with walk the filesystem and when
it finds a directory with a git repo it will print out the status.### `gitctrl remote-origin-must-ssh`
Go to some directory and run this command. The tool with walk the filesystem and when
it finds a directory with a git repo that has a remote named ***origin*** and has the prefix
`https://github.com` it will convert the URL and log the change as follows:```
https://github.com/crhntr/gitctrl --> [email protected]:crhntr/gitctrl
```