Update README.md
This commit is contained in:
parent
f3c11ab10d
commit
062df7b7ea
1 changed files with 25 additions and 17 deletions
42
README.md
42
README.md
|
@ -116,7 +116,7 @@ Renames files in the current directory by splitting camelCase, PascalCase, and o
|
||||||
### Usage
|
### Usage
|
||||||
Run the script in the directory containing the files you want to rename:
|
Run the script in the directory containing the files you want to rename:
|
||||||
```bash
|
```bash
|
||||||
./camel
|
camel
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -218,6 +218,10 @@ linecount .py .sh # Count lines only in .py and .sh files
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
Here’s the updated and refined documentation for the `push` and `pull` scripts:
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
## 🔄 `push` & `pull` - Bulk Git Repository Management
|
## 🔄 `push` & `pull` - Bulk Git Repository Management
|
||||||
|
|
||||||
Scripts to automate updates and management of multiple Git repositories.
|
Scripts to automate updates and management of multiple Git repositories.
|
||||||
|
@ -225,14 +229,17 @@ Scripts to automate updates and management of multiple Git repositories.
|
||||||
### Setup
|
### Setup
|
||||||
|
|
||||||
1. **Create a Repository List**
|
1. **Create a Repository List**
|
||||||
Add repository paths to `repos.txt` in the same directory as the scripts, one per line:
|
Add repository paths to `~/.repos.txt`, one per line:
|
||||||
```plaintext
|
```plaintext
|
||||||
~/workshop/sijapi
|
~/sijapi
|
||||||
~/workshop/scripts/gitea/pathScripts
|
|
||||||
~/workshop/Nova/Themes/Neonva/neonva.novaextension
|
~/workshop/Nova/Themes/Neonva/neonva.novaextension
|
||||||
~/workshop/scripts/Swiftbar
|
~/scripts/pathScripts
|
||||||
|
~/scripts/Swiftbar
|
||||||
```
|
```
|
||||||
|
|
||||||
|
- Use `~` for home directory paths or replace it with absolute paths.
|
||||||
|
- Empty lines and lines starting with `#` are ignored.
|
||||||
|
|
||||||
2. **Make Scripts Executable**
|
2. **Make Scripts Executable**
|
||||||
```bash
|
```bash
|
||||||
chmod +x push pull
|
chmod +x push pull
|
||||||
|
@ -240,28 +247,29 @@ Scripts to automate updates and management of multiple Git repositories.
|
||||||
|
|
||||||
3. **Run the Scripts**
|
3. **Run the Scripts**
|
||||||
```bash
|
```bash
|
||||||
./pull # Pulls the latest changes from all repositories
|
pull # Pulls the latest changes from all repositories
|
||||||
./push # Pulls, stages, commits, and pushes local changes
|
push # Pulls, stages, commits, and pushes local changes
|
||||||
```
|
```
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|
||||||
#### `pull`
|
#### `pull`
|
||||||
- Recursively pulls the latest changes from all repositories listed in `repos.txt`.
|
- Recursively pulls the latest changes from all repositories listed in `~/.repos.txt`.
|
||||||
- Skips directories that are not Git repositories.
|
- Automatically expands `~` to the home directory.
|
||||||
- Forces pull to ensure synchronization.
|
- Skips directories that do not exist or are not Git repositories.
|
||||||
|
- Uses `git pull --force` to ensure synchronization.
|
||||||
|
|
||||||
#### `push`
|
#### `push`
|
||||||
- Pulls the latest changes.
|
- Pulls the latest changes from the current branch.
|
||||||
- Stages and commits all local changes with an auto-generated message: `Auto-update: <timestamp>`.
|
- Stages and commits all local changes with an auto-generated message: `Auto-update: <timestamp>`.
|
||||||
- Pushes updates to the current branch.
|
- Pushes updates to the current branch.
|
||||||
- Configures the `origin` remote automatically if missing.
|
- Configures the `origin` remote automatically if missing, using a URL based on the directory name.
|
||||||
|
|
||||||
### Notes
|
### Notes
|
||||||
- Both scripts skip empty lines and comments (`#`) in `repos.txt`.
|
- Both scripts assume `~/.repos.txt` is the repository list file. You can update the `REPOS_FILE` variable if needed.
|
||||||
- Ensure `repos.txt` is in the same directory as the scripts.
|
- Use absolute paths or ensure `~` is correctly expanded to avoid issues.
|
||||||
- Use absolute or relative paths for repository locations.
|
- The scripts skip non-existent directories and invalid Git repositories.
|
||||||
- `push` will auto-configure `origin` based on directory name if missing.
|
- `push` will attempt to set the `origin` remote automatically if it is missing.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
@ -276,7 +284,7 @@ The `vitals` script provides detailed system diagnostics, VPN status, DNS config
|
||||||
|
|
||||||
2. **Run the script**:
|
2. **Run the script**:
|
||||||
```bash
|
```bash
|
||||||
./vitals
|
vitals
|
||||||
```
|
```
|
||||||
|
|
||||||
Example output (JSON):
|
Example output (JSON):
|
||||||
|
|
Loading…
Add table
Reference in a new issue