skilleter-thingy 0.0.95__tar.gz → 0.0.97__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of skilleter-thingy might be problematic. Click here for more details.
- {skilleter_thingy-0.0.95/skilleter_thingy.egg-info → skilleter_thingy-0.0.97}/PKG-INFO +106 -17
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/README.md +105 -16
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/pyproject.toml +1 -1
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/multigit.py +196 -78
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/git2.py +0 -4
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97/skilleter_thingy.egg-info}/PKG-INFO +106 -17
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/LICENSE +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/setup.cfg +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/__init__.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/addpath.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/borger.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/box.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/console_colours.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/diskspacecheck.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/docker_purge.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/ffind.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/ggit.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/ggrep.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_br.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_ca.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_cleanup.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_co.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_common.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_hold.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_mr.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_parent.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_review.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_update.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/git_wt.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/gitcmp_helper.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/gitprompt.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/gl.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/gphotosync.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/linecount.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/moviemover.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/photodupe.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/phototidier.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/py_audit.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/readable.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/remdir.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/rmdupe.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/rpylint.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/splitpics.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/strreplace.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/sysmon.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/tfm.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/tfparse.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/__init__.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/colour.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/dc_curses.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/dc_defaults.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/dc_util.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/dircolors.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/docker.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/files.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/git.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/gitlab.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/path.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/popup.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/process.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/run.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/tfm_pane.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/tidy.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/thingy/venv_template.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/trimpath.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/venv_create.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/window_rename.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/xchmod.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy/yamlcheck.py +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy.egg-info/SOURCES.txt +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy.egg-info/dependency_links.txt +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy.egg-info/entry_points.txt +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy.egg-info/requires.txt +0 -0
- {skilleter_thingy-0.0.95 → skilleter_thingy-0.0.97}/skilleter_thingy.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: skilleter_thingy
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.97
|
|
4
4
|
Summary: A collection of useful utilities, mainly aimed at making Git more friendly
|
|
5
5
|
Author-email: John Skilleter <john@skilleter.org.uk>
|
|
6
6
|
Project-URL: Home, https://skilleter.org.uk
|
|
@@ -36,43 +36,59 @@ This README just contains a summary of the functionality of each command.
|
|
|
36
36
|
|
|
37
37
|
# Git Repo Management
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## Multigit
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Multigit is a tool for managing a collection of related git working trees.
|
|
42
42
|
|
|
43
|
-
This is intended for use in a situation where you have a collection of related git working trees organised in a directory hierarchy
|
|
43
|
+
This is intended for use in a situation where you have a collection of related git working trees organised in a directory hierarchy which aren't managed using git submodules or any other tool. It allows you to run git commands on multiple working trees at once, without navigating around the different working trees to do so and to select which working trees commands are run in.
|
|
44
|
+
|
|
45
|
+
## Initialisation
|
|
44
46
|
|
|
45
47
|
Start by running ensuring that the default branch (e.g. `main`) is checked out in each of the working trees and, in the top-level directory, run `multigit init` to create the configuration file which, by default is called `multigit.toml` - this is just a text file that sets the configuration for each working tree in terms of name, origin, default branch and location.
|
|
46
48
|
|
|
49
|
+
## Multigit Command Line
|
|
50
|
+
|
|
47
51
|
The multigit command line format is:
|
|
48
52
|
|
|
49
53
|
multigit OPTIONS COMMAND
|
|
50
54
|
|
|
51
|
-
Where COMMAND is an internal multigit command if it starts with a
|
|
55
|
+
Where COMMAND is an internal multigit command if it starts with a `+` and is a git command otherwise (including the additional git commands described in this document).
|
|
52
56
|
|
|
53
|
-
By default, when multigit is invoked with a git command, it runs a the command in each of the working trees selected by the command line options passed to multigit (if no options are specified then the command is run in all the working trees.
|
|
57
|
+
By default, when multigit is invoked with a git command, it runs a the command in each of the working trees selected by the command line options passed to multigit (if no options are specified then the command is run in *all* the working trees.
|
|
54
58
|
|
|
55
59
|
The command takes a number of options that can be used to select the list of working trees that each of the subcommands that it supports runs in:
|
|
56
60
|
|
|
57
|
-
|
|
61
|
+
`--repos REPO` / `-r REPO` Allows a list of working trees to be specfied, either by path, name or a wildcard matching either.
|
|
62
|
+
|
|
63
|
+
`--modified` / `-m` Run only in working trees containing locally modified files
|
|
64
|
+
|
|
65
|
+
`--branched` / `-b` Run only in working trees where the current branch that is checked out is NOT the default branch
|
|
58
66
|
|
|
59
|
-
|
|
67
|
+
`--tag TAG` / `-t TAG` Run only in working trees that are tagged with the specified tag
|
|
60
68
|
|
|
61
|
-
|
|
69
|
+
These options are AND-ed together, so specifying `--modified --branched --tag WOMBAT` will select only working trees that are modified AND branched AND tagged with `WOMBAT`, but the parameters to the `--repos` and `--tag` options are OR-ed together, so specifying `--tag WOMBAT --tag EMU` will select repos that are tagged as `WOMBAT` *OR* `EMU`.
|
|
70
|
+
|
|
71
|
+
Multigit tags are stored in the configuration file, not within the working tree and each working tree can have multiple tags.
|
|
72
|
+
|
|
73
|
+
## Multigit Commands
|
|
62
74
|
|
|
63
75
|
Multigit supports a small list of subcommands, each of which are prefixed with a `+` to distinguish them from Git commands:
|
|
64
76
|
|
|
65
|
-
|
|
77
|
+
`+init` - Create or update the configuration file
|
|
78
|
+
|
|
79
|
+
`+dir` - Given the name of a working tree, output the location within the multigit tree of that working tree if the name matches uniquely, or the name of the directory where the multigit configuration file resides if no parameter is specified.
|
|
66
80
|
|
|
67
|
-
|
|
81
|
+
`+config` - Print the name and location of the multigit configuration file.
|
|
68
82
|
|
|
69
|
-
|
|
83
|
+
`+tag TAG` - If no tag specified list tags applied to the specified working trees. If a tag *is* specified, then *apply* the tag to the specified working trees.
|
|
70
84
|
|
|
71
|
-
|
|
85
|
+
`+untag TAG` - Remove the tag from the specified working trees (do nothing if the tag is not applied in the first place).
|
|
86
|
+
|
|
87
|
+
Any command *not* prefixed with `+` is run in each of the working trees (filtered by the various multigit options) as a git command.
|
|
72
88
|
|
|
73
89
|
For example; `multigit -m commit -ab` would run `git commit -a` in each of the working trees that is branched and contains modified files.
|
|
74
90
|
|
|
75
|
-
The `+dir` command can be used with shell aliases (or their equivalent in the user's shell of choice) to create an alias to run, for example, `cd (multigit +dir "$@")` (Bash) or `cd (multigit +dir $argv)` (for the Fish shell) that would cd to the top level
|
|
91
|
+
The `+dir` command can be used with shell aliases (or their equivalent in the user's shell of choice) to create an alias to run, for example, `cd (multigit +dir "$@")` (Bash) or `cd (multigit +dir $argv)` (for the Fish shell) that would cd to the top level directory.
|
|
76
92
|
|
|
77
93
|
# Miscellaneous Git Utilities
|
|
78
94
|
|
|
@@ -82,23 +98,96 @@ Output a string containing colour-coded shell nesting level, current directory a
|
|
|
82
98
|
|
|
83
99
|
# Git Extensions
|
|
84
100
|
|
|
85
|
-
Due to the way that the git command works, these can be run as they were additional git subcommands.
|
|
101
|
+
Due to the way that the git command works, these can be run as they were additional git subcommands, although, due to a limitation in git, the only things that does not work is the `--help` option where the command has to be run with a hyphen between `git` and the subcommand - for example `git ca --help` does not work, but `git-ca --help` does.
|
|
102
|
+
|
|
103
|
+
## Branch Names
|
|
104
|
+
|
|
105
|
+
Where one of the git extensions takes an existing branch name as a parameter, the branch name can be abbreviated and the abbreviated form is expanded according to the following rules:
|
|
106
|
+
|
|
107
|
+
* If the specified branch name exactly matches an existing branch, tag or commit ID then that is used (this includes remote branches where appropriate, if no local branches match).
|
|
108
|
+
* Otherwise, the branch name is compared to existing branches (again, including remote branches where appropriate, if no local branches match) and, if the specified name uniquely partially matches an existing branch (optionally using `*` and `?` wildcard characters) that branch is used. If it matches multiple branches than an error is reported.
|
|
109
|
+
|
|
110
|
+
For example, given a repo with the following branches:
|
|
111
|
+
|
|
112
|
+
origin/wombat
|
|
113
|
+
origin/platypus
|
|
114
|
+
wombat
|
|
115
|
+
emu
|
|
116
|
+
battery
|
|
117
|
+
chaos
|
|
118
|
+
|
|
119
|
+
Then:
|
|
120
|
+
|
|
121
|
+
* 'emu' will match 'emu'
|
|
122
|
+
* 'wombat' will match 'wombat' but not 'origin/wombat' since the local branch takes precedence
|
|
123
|
+
* 'at' will match both 'wombat' and 'battery' and will report an error
|
|
124
|
+
* 'pus' will match 'origin/platypus'
|
|
125
|
+
|
|
126
|
+
This is most useful where branches contain ticket numbers so, for instance given a branch called `feature/SKIL-103` you can check it out using `git co 103` assuming no other local branches contain `103` in their name.
|
|
127
|
+
|
|
128
|
+
Note that the concept of the default branch `DEFAULT` mentioned above *only* applies when using the `multigit` command, although some of the commands will treat branches called `master` or `main` as special cases (see the individual command documentation).
|
|
86
129
|
|
|
87
130
|
## git ca
|
|
88
131
|
|
|
89
132
|
Improved version of 'git commit --amend'. Updates files that are already in the commit and, optionally, adds and commits additional files.
|
|
90
133
|
|
|
134
|
+
usage: git-ca [-h] [--added] [--all] [--everything] [--ignored] [--patch] [--verbose] [--dry-run] [files ...]
|
|
135
|
+
|
|
136
|
+
positional arguments:
|
|
137
|
+
files List of files to add to the commit
|
|
138
|
+
|
|
139
|
+
options:
|
|
140
|
+
-h, --help show this help message and exit
|
|
141
|
+
--added, -A Update files in the current commit, including files added with `git add`
|
|
142
|
+
--all, -a Append all locally-modified, tracked files to the current commit
|
|
143
|
+
--everything, -e Append all modified and untracked files to the current commit (implies `~--all`)
|
|
144
|
+
--ignored, -i Include files normally hidden by `.gitignore`
|
|
145
|
+
--patch, -p Use the interactive patch selection interface to chose which changes to commit.
|
|
146
|
+
--verbose, -v Verbose mode
|
|
147
|
+
--dry-run, -D Dry-run
|
|
148
|
+
|
|
91
149
|
## git cleanup
|
|
92
150
|
|
|
93
151
|
List or delete branches that have already been merged and delete tracking branches that are no longer on the remote.
|
|
94
152
|
|
|
153
|
+
git-cleanup [-h] [--delete] [--master MASTER] [--force] [--unmerged] [--yes] [--debug] [branches ...]
|
|
154
|
+
|
|
155
|
+
positional arguments:
|
|
156
|
+
|
|
157
|
+
branches List of branches to check (default is all branches)
|
|
158
|
+
|
|
159
|
+
options:
|
|
160
|
+
-h, --help show this help message and exit
|
|
161
|
+
--delete, -d Delete all branches that have been merged
|
|
162
|
+
--master MASTER, -m MASTER, --main MASTER
|
|
163
|
+
Specify the master branch (Attempts to read this from GitLab or defaults to "develop" if present or "master" or "main" otherwise
|
|
164
|
+
--force, -f Allow protected branches (e.g. master) to be removed
|
|
165
|
+
--unmerged, -u List branches that have NOT been merged
|
|
166
|
+
--yes, -y Assume "yes" in response to any prompts (e.g. to delete branches)
|
|
167
|
+
--debug Enable debug output
|
|
168
|
+
|
|
95
169
|
## git co
|
|
96
170
|
|
|
97
|
-
Equivalent to
|
|
171
|
+
Equivalent to `git checkout` but with enhanced branch matching as described above. The command does not support the full range of options supported by the `git checkout` comamnd which should still be used where additional functionality is required.
|
|
172
|
+
|
|
173
|
+
git-co [-h] [--branch] [--update] [--rebase] [--force] [--exact] [--debug] branchname
|
|
174
|
+
|
|
175
|
+
positional arguments:
|
|
176
|
+
|
|
177
|
+
branchname The branch name (or a partial name that matches uniquely against a local branch, remote branch, commit ID or tag)
|
|
178
|
+
|
|
179
|
+
options:
|
|
180
|
+
-h, --help show this help message and exit
|
|
181
|
+
--branch, -b Create the specified branch
|
|
182
|
+
--update, -u If a remote branch exists, delete any local branch and check out the remote version
|
|
183
|
+
--rebase, -r Rebase the branch onto its parent after checking it out
|
|
184
|
+
--force, -f When using the update option, recreate the local branch even if it is owned by the current user (based on the author of the most recent commit)
|
|
185
|
+
--exact, -e Do not use branch name matching - check out the branch as specified (if it exists)
|
|
186
|
+
--debug Enable debug output
|
|
98
187
|
|
|
99
188
|
## git parent
|
|
100
189
|
|
|
101
|
-
Attempt to determine the parent branch for the specified branch (defaulting to the current one)
|
|
190
|
+
Attempt to determine the parent branch for the specified branch (defaulting to the current one).
|
|
102
191
|
|
|
103
192
|
## git update
|
|
104
193
|
|
|
@@ -14,43 +14,59 @@ This README just contains a summary of the functionality of each command.
|
|
|
14
14
|
|
|
15
15
|
# Git Repo Management
|
|
16
16
|
|
|
17
|
-
##
|
|
17
|
+
## Multigit
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Multigit is a tool for managing a collection of related git working trees.
|
|
20
20
|
|
|
21
|
-
This is intended for use in a situation where you have a collection of related git working trees organised in a directory hierarchy
|
|
21
|
+
This is intended for use in a situation where you have a collection of related git working trees organised in a directory hierarchy which aren't managed using git submodules or any other tool. It allows you to run git commands on multiple working trees at once, without navigating around the different working trees to do so and to select which working trees commands are run in.
|
|
22
|
+
|
|
23
|
+
## Initialisation
|
|
22
24
|
|
|
23
25
|
Start by running ensuring that the default branch (e.g. `main`) is checked out in each of the working trees and, in the top-level directory, run `multigit init` to create the configuration file which, by default is called `multigit.toml` - this is just a text file that sets the configuration for each working tree in terms of name, origin, default branch and location.
|
|
24
26
|
|
|
27
|
+
## Multigit Command Line
|
|
28
|
+
|
|
25
29
|
The multigit command line format is:
|
|
26
30
|
|
|
27
31
|
multigit OPTIONS COMMAND
|
|
28
32
|
|
|
29
|
-
Where COMMAND is an internal multigit command if it starts with a
|
|
33
|
+
Where COMMAND is an internal multigit command if it starts with a `+` and is a git command otherwise (including the additional git commands described in this document).
|
|
30
34
|
|
|
31
|
-
By default, when multigit is invoked with a git command, it runs a the command in each of the working trees selected by the command line options passed to multigit (if no options are specified then the command is run in all the working trees.
|
|
35
|
+
By default, when multigit is invoked with a git command, it runs a the command in each of the working trees selected by the command line options passed to multigit (if no options are specified then the command is run in *all* the working trees.
|
|
32
36
|
|
|
33
37
|
The command takes a number of options that can be used to select the list of working trees that each of the subcommands that it supports runs in:
|
|
34
38
|
|
|
35
|
-
|
|
39
|
+
`--repos REPO` / `-r REPO` Allows a list of working trees to be specfied, either by path, name or a wildcard matching either.
|
|
40
|
+
|
|
41
|
+
`--modified` / `-m` Run only in working trees containing locally modified files
|
|
42
|
+
|
|
43
|
+
`--branched` / `-b` Run only in working trees where the current branch that is checked out is NOT the default branch
|
|
36
44
|
|
|
37
|
-
|
|
45
|
+
`--tag TAG` / `-t TAG` Run only in working trees that are tagged with the specified tag
|
|
38
46
|
|
|
39
|
-
|
|
47
|
+
These options are AND-ed together, so specifying `--modified --branched --tag WOMBAT` will select only working trees that are modified AND branched AND tagged with `WOMBAT`, but the parameters to the `--repos` and `--tag` options are OR-ed together, so specifying `--tag WOMBAT --tag EMU` will select repos that are tagged as `WOMBAT` *OR* `EMU`.
|
|
48
|
+
|
|
49
|
+
Multigit tags are stored in the configuration file, not within the working tree and each working tree can have multiple tags.
|
|
50
|
+
|
|
51
|
+
## Multigit Commands
|
|
40
52
|
|
|
41
53
|
Multigit supports a small list of subcommands, each of which are prefixed with a `+` to distinguish them from Git commands:
|
|
42
54
|
|
|
43
|
-
|
|
55
|
+
`+init` - Create or update the configuration file
|
|
56
|
+
|
|
57
|
+
`+dir` - Given the name of a working tree, output the location within the multigit tree of that working tree if the name matches uniquely, or the name of the directory where the multigit configuration file resides if no parameter is specified.
|
|
44
58
|
|
|
45
|
-
|
|
59
|
+
`+config` - Print the name and location of the multigit configuration file.
|
|
46
60
|
|
|
47
|
-
|
|
61
|
+
`+tag TAG` - If no tag specified list tags applied to the specified working trees. If a tag *is* specified, then *apply* the tag to the specified working trees.
|
|
48
62
|
|
|
49
|
-
|
|
63
|
+
`+untag TAG` - Remove the tag from the specified working trees (do nothing if the tag is not applied in the first place).
|
|
64
|
+
|
|
65
|
+
Any command *not* prefixed with `+` is run in each of the working trees (filtered by the various multigit options) as a git command.
|
|
50
66
|
|
|
51
67
|
For example; `multigit -m commit -ab` would run `git commit -a` in each of the working trees that is branched and contains modified files.
|
|
52
68
|
|
|
53
|
-
The `+dir` command can be used with shell aliases (or their equivalent in the user's shell of choice) to create an alias to run, for example, `cd (multigit +dir "$@")` (Bash) or `cd (multigit +dir $argv)` (for the Fish shell) that would cd to the top level
|
|
69
|
+
The `+dir` command can be used with shell aliases (or their equivalent in the user's shell of choice) to create an alias to run, for example, `cd (multigit +dir "$@")` (Bash) or `cd (multigit +dir $argv)` (for the Fish shell) that would cd to the top level directory.
|
|
54
70
|
|
|
55
71
|
# Miscellaneous Git Utilities
|
|
56
72
|
|
|
@@ -60,23 +76,96 @@ Output a string containing colour-coded shell nesting level, current directory a
|
|
|
60
76
|
|
|
61
77
|
# Git Extensions
|
|
62
78
|
|
|
63
|
-
Due to the way that the git command works, these can be run as they were additional git subcommands.
|
|
79
|
+
Due to the way that the git command works, these can be run as they were additional git subcommands, although, due to a limitation in git, the only things that does not work is the `--help` option where the command has to be run with a hyphen between `git` and the subcommand - for example `git ca --help` does not work, but `git-ca --help` does.
|
|
80
|
+
|
|
81
|
+
## Branch Names
|
|
82
|
+
|
|
83
|
+
Where one of the git extensions takes an existing branch name as a parameter, the branch name can be abbreviated and the abbreviated form is expanded according to the following rules:
|
|
84
|
+
|
|
85
|
+
* If the specified branch name exactly matches an existing branch, tag or commit ID then that is used (this includes remote branches where appropriate, if no local branches match).
|
|
86
|
+
* Otherwise, the branch name is compared to existing branches (again, including remote branches where appropriate, if no local branches match) and, if the specified name uniquely partially matches an existing branch (optionally using `*` and `?` wildcard characters) that branch is used. If it matches multiple branches than an error is reported.
|
|
87
|
+
|
|
88
|
+
For example, given a repo with the following branches:
|
|
89
|
+
|
|
90
|
+
origin/wombat
|
|
91
|
+
origin/platypus
|
|
92
|
+
wombat
|
|
93
|
+
emu
|
|
94
|
+
battery
|
|
95
|
+
chaos
|
|
96
|
+
|
|
97
|
+
Then:
|
|
98
|
+
|
|
99
|
+
* 'emu' will match 'emu'
|
|
100
|
+
* 'wombat' will match 'wombat' but not 'origin/wombat' since the local branch takes precedence
|
|
101
|
+
* 'at' will match both 'wombat' and 'battery' and will report an error
|
|
102
|
+
* 'pus' will match 'origin/platypus'
|
|
103
|
+
|
|
104
|
+
This is most useful where branches contain ticket numbers so, for instance given a branch called `feature/SKIL-103` you can check it out using `git co 103` assuming no other local branches contain `103` in their name.
|
|
105
|
+
|
|
106
|
+
Note that the concept of the default branch `DEFAULT` mentioned above *only* applies when using the `multigit` command, although some of the commands will treat branches called `master` or `main` as special cases (see the individual command documentation).
|
|
64
107
|
|
|
65
108
|
## git ca
|
|
66
109
|
|
|
67
110
|
Improved version of 'git commit --amend'. Updates files that are already in the commit and, optionally, adds and commits additional files.
|
|
68
111
|
|
|
112
|
+
usage: git-ca [-h] [--added] [--all] [--everything] [--ignored] [--patch] [--verbose] [--dry-run] [files ...]
|
|
113
|
+
|
|
114
|
+
positional arguments:
|
|
115
|
+
files List of files to add to the commit
|
|
116
|
+
|
|
117
|
+
options:
|
|
118
|
+
-h, --help show this help message and exit
|
|
119
|
+
--added, -A Update files in the current commit, including files added with `git add`
|
|
120
|
+
--all, -a Append all locally-modified, tracked files to the current commit
|
|
121
|
+
--everything, -e Append all modified and untracked files to the current commit (implies `~--all`)
|
|
122
|
+
--ignored, -i Include files normally hidden by `.gitignore`
|
|
123
|
+
--patch, -p Use the interactive patch selection interface to chose which changes to commit.
|
|
124
|
+
--verbose, -v Verbose mode
|
|
125
|
+
--dry-run, -D Dry-run
|
|
126
|
+
|
|
69
127
|
## git cleanup
|
|
70
128
|
|
|
71
129
|
List or delete branches that have already been merged and delete tracking branches that are no longer on the remote.
|
|
72
130
|
|
|
131
|
+
git-cleanup [-h] [--delete] [--master MASTER] [--force] [--unmerged] [--yes] [--debug] [branches ...]
|
|
132
|
+
|
|
133
|
+
positional arguments:
|
|
134
|
+
|
|
135
|
+
branches List of branches to check (default is all branches)
|
|
136
|
+
|
|
137
|
+
options:
|
|
138
|
+
-h, --help show this help message and exit
|
|
139
|
+
--delete, -d Delete all branches that have been merged
|
|
140
|
+
--master MASTER, -m MASTER, --main MASTER
|
|
141
|
+
Specify the master branch (Attempts to read this from GitLab or defaults to "develop" if present or "master" or "main" otherwise
|
|
142
|
+
--force, -f Allow protected branches (e.g. master) to be removed
|
|
143
|
+
--unmerged, -u List branches that have NOT been merged
|
|
144
|
+
--yes, -y Assume "yes" in response to any prompts (e.g. to delete branches)
|
|
145
|
+
--debug Enable debug output
|
|
146
|
+
|
|
73
147
|
## git co
|
|
74
148
|
|
|
75
|
-
Equivalent to
|
|
149
|
+
Equivalent to `git checkout` but with enhanced branch matching as described above. The command does not support the full range of options supported by the `git checkout` comamnd which should still be used where additional functionality is required.
|
|
150
|
+
|
|
151
|
+
git-co [-h] [--branch] [--update] [--rebase] [--force] [--exact] [--debug] branchname
|
|
152
|
+
|
|
153
|
+
positional arguments:
|
|
154
|
+
|
|
155
|
+
branchname The branch name (or a partial name that matches uniquely against a local branch, remote branch, commit ID or tag)
|
|
156
|
+
|
|
157
|
+
options:
|
|
158
|
+
-h, --help show this help message and exit
|
|
159
|
+
--branch, -b Create the specified branch
|
|
160
|
+
--update, -u If a remote branch exists, delete any local branch and check out the remote version
|
|
161
|
+
--rebase, -r Rebase the branch onto its parent after checking it out
|
|
162
|
+
--force, -f When using the update option, recreate the local branch even if it is owned by the current user (based on the author of the most recent commit)
|
|
163
|
+
--exact, -e Do not use branch name matching - check out the branch as specified (if it exists)
|
|
164
|
+
--debug Enable debug output
|
|
76
165
|
|
|
77
166
|
## git parent
|
|
78
167
|
|
|
79
|
-
Attempt to determine the parent branch for the specified branch (defaulting to the current one)
|
|
168
|
+
Attempt to determine the parent branch for the specified branch (defaulting to the current one).
|
|
80
169
|
|
|
81
170
|
## git update
|
|
82
171
|
|