Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/seb35/git-iterate
An utility to iterate over subdirectories containing a Git repository
https://github.com/seb35/git-iterate
git git-subcommand
Last synced: 15 days ago
JSON representation
An utility to iterate over subdirectories containing a Git repository
- Host: GitHub
- URL: https://github.com/seb35/git-iterate
- Owner: Seb35
- License: wtfpl
- Created: 2016-10-05T14:29:41.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-04-07T19:56:50.000Z (7 months ago)
- Last Synced: 2024-10-08T21:41:53.150Z (about 1 month ago)
- Topics: git, git-subcommand
- Language: Shell
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
git-iterate
===========If you have to repeat a same Git operation over a bunch of subdirectories (e.g. 'status' or 'branch -vv'), this small Git addon is dedicated to this task.
Examples:
```
git iterate -- status
git iterate -q dir1 dir2 -- fetch --all
git iterate -q dir1 dir2 foreach myscript.sh
```WARNING: the parameters names and exact features may change, this tool is not in a "stable" state given it evolves according to my own needs. Feedback about the parameters names and their associated features are welcome.
Syntax
------### General syntax:
```
git iterate [-q|--quiet] [...] --
```* -q: [optional] Remove all non-error output
* --quiet: [optional] Remove the directory names in which Git is currently running
* ...: [optional] Subdirectories names where the Git subcommand must be run, by default current directory
* : standard Git command and parameters ('status', 'fetch --all', 'pull', etc.)### Non-Git commands:
```
git iterate [-q|--quiet] [...] foreach
```* -q: [optional] Remove all non-error output
* --quiet: [optional] Remove the directory names in which Git is currently running
* ...: [optional] Subdirectories names where the Git subcommand must be run, by default current directory
* : general shell command to be executed in Git directories ('ls', etc.)License
-------* License: WTFPL 2.0
* Author: Seb35 - Sébastien BeyouContribute
----------Although this is a small program, any contribution is welcome! Please [open an issue](https://github.com/Seb35/git-iterate/issues) to discuss ideas or bugs, or even [submit pull requests](https://github.com/Seb35/git-iterate/pulls) to propose implementations.
Here are some ideas for possible improvements.
Quality:
* test in various environments - I only tested it on Debian
* still improve documentation?
* write unit tests
* package - for DEB, RPM, …
* translate the documentation
* get some user feedback about the CLI interface, and amongst others: the quiet optionsBugs:
* detect if bold is supported and possibly how: 1. if no bold is supported it should be deactivated, for instance in non-console outputs or non-compatible consoles; 2. I saw "echo -e" must be used for Bash but "echo" must be used for sh.Features:
* add an option to use non-bold for the directory names?
* add a special syntax `git iterate [...]` to only display Git directories?
* add an option to stop on first error, on first output? use a non-zero exit code in this case?
* add an option to explicitely search Git directories inside Git directories? or make it the default behaviour (will be longer in this case)?