Commit graph

94 commits

Author SHA1 Message Date
kdergachev b450b36036
Added edit/remove functionality to git-ignore (#1258)
* Added edit/remove functionality to git-ignore.

* Minor change to array-string assignment.

* Fixes array handling for remove.

* Suggested fixes (iteration over arguments, pattern removal, editor handling, tmp file location, symlinked gitignore handling).

* Changed pure bash editing of files to an awk script. Some other minor cosmetic changes.

* Updated docs.

* Modified autocomplete to work with new git-ignore

* Added help message to git-ignore.

* Added help flags to git-ignore's man.

* Made $file in eval safe. Should not do the same for editor since then all of the GIT_EDITOR will be treated as command (flags included).

* Typo fixes.
2026-07-14 19:42:02 +08:00
Utsav Sabharwal e92878b81b
feat: add git-delete-gone-branches command (#1239)
* feat: add git-delete-gone-branches command

Adds a new command to delete local branches whose remote-tracking
branch has been deleted (shown as [gone] in git branch -vv).

This is a common need after PRs are merged and remote branches are
cleaned up, leaving stale local branches behind.

Features:
- Deletes all local branches with a gone remote in one command
- --dry-run / -n flag to preview branches before deletion

Closes #1220

* Address PR review feedback on git-delete-gone-branches

- Use git for-each-ref instead of git branch -vv to avoid false
  positives from commit messages containing ': gone]'
- Add interactive confirmation prompt by default; skip with -f/--force
- Add -p/--prune flag to run git fetch --prune before checking
- Add generated man page .1 and .html files

* Use GitHub profile for author contact in man page

* Fix gone-branch detection with nobracket format
2026-06-09 10:36:27 +08:00
Erik Skultety 5367101f2e
Support passing ref to git-commits-since (#1228) 2026-02-02 21:39:48 -08:00
johnpyp 6f4cf0c1bb
feat: delete-branch multiple unique branch names completions (#1221) 2025-12-18 12:40:24 -08:00
Daniele Paolella cf6d40d446
Improvements to Bash completion (#1210)
* Sort Bash completion functions

* feat: add Bash completion for `git rename-branch`

* feat: add Bash completion for `git rename-remote`

* feat: add Bash completion for `git rename-tag`

* fix: use default completion for `git rename-file`

* Refactor rename completion functions common logic
2025-08-29 18:29:31 +08:00
Andrew Sullivan Cant c63b46a33b
add git-wip and git-unwip (#669)
* Upgrade codespell to v2.4.0

It is a lastet verison, and is needed so that I can use the inline
ignore support in a future commit.

After updating tests/pyproject.toml I ran the following commands:
```
cd tests
poetry lock --no-update
poetry install
```

I also fixed a spelling error in man/git-summary.md, which was not
caught by the old version of codespell. After updating the file I also
updated the related files by running the following commands:

```
cd man
make -C .. man/git-summary.{1,html}
```

* add git-wip and git-unwip

Updated/re-built the documentation with:
```
cd man
make -C .. man/git-unwip.{1,html}
make -C .. man/git-wip.{1,html}
make -C .. man/git-extras.{1,html}
```
2025-05-14 17:05:41 +08:00
Pierre Ayoub 18d1017325
feat(git-bulk): add new option to not follow hidden directories (#1195)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
* feat(git-bulk): add --no-follow-hidden flag

* docs(git-bulk): add --no-follow-hidden description

* docs(man): make ronn

* docs(git-bulk): put --no-follow-hidden at right place in usage()

* refactor(git-bulk): logic optimization

Remove unnecessary subshell

Co-authored-by: Edwin Kofler <edwin@kofler.dev>

* fix(git-bulk): bad test operator

With the Bash' regexp matching operator `=~`, we need to use the Bash
conditional expression evaluation command `[[ ]]`.

* docs(completion.zsh): add --no-follow-hidden and --no-follow-symlink

---------

Co-authored-by: Pierre Ayoub <pierre.ayoub@protonmail.com>
Co-authored-by: Edwin Kofler <edwin@kofler.dev>
2025-03-05 10:39:41 +08:00
Pierre Ayoub a841845d9a
Feat: allow git-summary showing full path of repository (#1193)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
* feat(git-summary): add --full-path option

* docs(git-summary): add doc for --full-path option

* docs(man): make using ronn

* docs(git-extras-completion.zsh): add --full-path option of git-summary
2025-02-27 14:25:55 +08:00
Pierre Ayoub 64687599ae
docs(git-bulk): Add zsh completion (#1190)
* docs(git-bulk): Add zsh completion

* docs(git-bulk): Harmonize help strings

* docs(git-bulk): simplify previous bad logic

The previous logic was not allowing to use multiple options (which is
often the case). This was bad because this is my first time with zsh
automcompletion. Without it, the user can use any flag combination --
but at least, he has the freedom.
2025-02-26 12:34:04 +08:00
Edwin Kofler 1345c5977d
Delete etc/test.fish (#1185) 2024-11-29 10:39:09 +08:00
oikarinen 2f4b57d52b
feat: add git-continue (#1176)
Some checks are pending
ci / lint (push) Waiting to run
ci / typo (push) Waiting to run
ci / test (push) Waiting to run
ci / build (macos-latest) (push) Waiting to run
ci / build (ubuntu-latest) (push) Waiting to run
* feat: add git-continue

Also refactor `git-abort` to parse action from the called file name.

There's a promise for this in #865 but that was a long time ago.

* fix: add git-continue

address review comments, fix the script, remove unnecessary testpath
import.
2024-11-28 16:50:29 +08:00
CodeByZach c32869de37
feat: add rename-file command (#1149)
Some checks failed
ci / lint (push) Has been cancelled
ci / typo (push) Has been cancelled
ci / test (push) Has been cancelled
ci / build (macos-latest) (push) Has been cancelled
ci / build (ubuntu-latest) (push) Has been cancelled
2024-08-02 01:19:35 -07:00
Josh McKinney 9049967232
feat: add reverse option to git-brv (#1123)
* feat: add reverse option to git-brv

When there are a large amount of branches it is often useful to see the
most recent branches last as they end up closer to the prompt. This adds
a new --reverse / -r option and an environment variable to set the
default behavior (GIT_BRV_REVERSE).

* git-brv: change to git option instead of environment variable and fix typo

* wrap git option in backticks for git-brv and fix git-feature title

* update git-feature docs

* fix missing breaks in git-feature.md
2023-12-16 12:05:52 +08:00
Edwin Kofler 954ba1fb7c
fix: Restore zsh completions to working completion (#1079) 2023-09-23 13:38:15 +08:00
Gerrit-K e4152db482
fix: add missing quote in git-extras-completion.zsh (#1078)
Broken in #1074
2023-09-22 19:31:09 +08:00
Edwin Kofler dee7c7f1d0
feat: Implement completion for git coauthor (#1074) 2023-09-22 11:58:01 +08:00
Edwin Kofler e793f8979b
fix: Move improvements via ShellCheck (#1075) 2023-09-22 11:57:48 +08:00
Edwin Kofler 8af43892f6
feat: Implement git-get command (#1045)
* feat: Add `git-get` command

* Update Commands.md

Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>

* fix: Use Git config to store value

* improve `git-get` description

* fix: Add `--global` to git invocation

* Enable passing options to `git clone`

* fix: Ordering of checks

---------

Co-authored-by: 罗泽轩 <spacewanderlzx@gmail.com>
2023-08-12 13:49:33 +08:00
Edwin Kofler 0b5d2cce55
Improve git-ignore command (#1047)
* Improve `git-ignore` command

* fix: Improve warnings/errors and modify `not_need_git_repo`
2023-07-13 14:29:39 +08:00
kang 3a258cbaad
Type properly __gitex_command_successful calls and capitalizate github to GitHub (#1049)
* Type properly `__gitex_command_successful` calls

* Capitalize github to GitHub
2023-06-19 22:05:30 +08:00
Edwin Kofler 2d221c1b67
tweak: Fix typos (#1046) 2023-05-18 10:19:24 +08:00
Joshua Li 2d1aa6daea
Update docs for git abort change (#1000) 2022-10-17 15:45:52 +08:00
罗泽轩 716459f79d
Merge pull request #944 from SimonTate/feature/sem-ver-prefix
git-release: Add prefix to semver
2022-04-18 15:06:34 +08:00
Simon Tate 613b909765 git-release: Add prefix to semver
To allow different release names other than specifically mm.vv.pp, this
adds the ability to use a prefix too.

For example, you can use:

```
$ git release --semver minor --prefix "prefix-"
```

This would allow the previous tags to be in the form `prefix-0.1.0`. A
more obvious use case for this would be a single letter, such as `v` or
`r` to use tags like: `r0.1.0` or `v0.1.0`.
2022-04-15 13:13:02 +01:00
Peter Benjamin 02bbdba792 chore: update docs & completions 2022-03-19 20:00:57 -07:00
overengineer 86bb1a6764 Added git-magic command 2021-10-08 07:05:50 +03:00
Simon Tate bc8876b063 git-clear: add force option
Add a new -f/--force option to git-clear to allow usage in scripts,
or without user input.

Add -h/--help/? for help

Also update the manual for git-clear for these changes.
2021-09-14 13:45:50 +01:00
Tobias Fendin e9708ba9f4 Updated completion for git summary 2021-08-07 17:31:51 +02:00
Przemek Kitszel b8e58ee9ba Add git-abort
New subcommand just calls git $op --abort, where $op is current git operation, like rebase
2021-07-05 23:43:39 +02:00
Vladimir Jimenez 910242c92b
Add delete-squashed-branches command 2021-05-24 00:13:57 -07:00
罗泽轩 e6caa931a5
Merge pull request #882 from vt-alt/git-utimes
git-utimes: Change files modification time to their last commit date
2020-11-29 11:40:12 +08:00
Aloxaf e92d54cadb
fix: zsh completion of git-coauthor command 2020-11-26 22:30:05 +08:00
Vitaly Chikunov aa174b3905 git-utimes: Change files modification time to their last commit date
Signed-off-by: Vitaly Chikunov <vt@altlinux.org>
2020-11-08 14:04:41 +03:00
spacewander e116406ff1 git-back: removed 2020-08-28 22:23:41 +08:00
spacewander 6afc2fb4a8 sort completion in alphabetical order 2020-08-25 14:53:11 +08:00
spacewander c56b61d2bd remove incorrect completion 2020-08-25 14:50:56 +08:00
spacewander c386733efd git-info: add zsh completion 2020-08-25 14:45:12 +08:00
Yuriy VG b4b81e290e Add bash completion for git-info 2020-08-21 19:22:07 +03:00
Tin Lai 4a7fcb7d1c
implement fish completions file
Signed-off-by: Tin Lai <oscar@tinyiu.com>
2020-07-27 15:45:37 +10:00
spacewander 23fcac8c4f break change: remove docs and other stuff of git-feature's alias 2020-05-31 11:03:11 +08:00
sgleizes edc4814ced Fix missing newline escapes in git-release zsh completion 2020-05-23 13:36:13 +02:00
Carlos Prado 3583825137 update zsh completion for bug and refactor commands 2020-04-05 03:32:27 +02:00
Carlos Prado 31079e0a60 updated zsh completion script 2020-04-05 03:29:24 +02:00
Rémy HUBSCHER 739ca052b4
Add documentation. 2020-03-19 16:10:20 +01:00
Mark Pitman 362a0c29ae Add git-browse command
Handles git@server and https://server remotes.
Allows specification of the remote to open
Closes #666
2020-03-15 01:40:09 -07:00
Brice Dutheil 80cd52701e
Fixes #770: Adds git-brv 2020-01-15 10:46:19 +01:00
Tom Andrade 704b1b4fdd Add flags -s and -u for signed tags 2019-11-26 08:31:06 +01:00
罗泽轩 a6a1754093
Merge pull request #795 from spacewander/git-squash-commit-msg
Git squash commit msg
2019-11-05 18:12:43 +08:00
spacewander 46ea733983 git-squash: miss completion script change 2019-11-05 10:35:36 +08:00
spacewander 7b9fbc4389 git-standup: add option '-B' to group the commits by branch 2019-11-01 17:32:55 +08:00