#git #branch #remote

app git-gone

Manage "gone" Git branches

13 releases (1 stable)

1.0.0 Aug 20, 2023
0.5.0 Apr 3, 2023
0.4.3 Dec 1, 2022
0.4.2 Oct 9, 2022
0.1.1 Sep 23, 2018

#3 in #prune

Download history 10/week @ 2023-11-01 3/week @ 2023-11-08 4/week @ 2023-11-15 42/week @ 2023-11-22 78/week @ 2023-11-29 23/week @ 2023-12-13 20/week @ 2023-12-20 32/week @ 2023-12-27 26/week @ 2024-01-17 20/week @ 2024-01-24 59/week @ 2024-01-31 1/week @ 2024-02-07 124/week @ 2024-02-14

204 downloads per month


161 lines


Sebastian Wiesner sebastian@swsnr.de :doctype: manpage :revnumber: 1.0.0 :revdate: 2023-08-20 :mansource: git-gone {revnumber} :manmanual: git-gone


git-gone - prune "gone" Git branches


git gone [-fv] list + git gone [-fv] prune


Lists or removes "gone" branches, that is, local branches which used to have an upstream branch on a remote which is now removed.

This situation typically occurs in a pull request workflow where the upstream branch gets deleted on the server after merging a pull request, leaving the local branch from which the pull request originated in place. git gone easily removes these left-over branches.


list:: List all gone branches.

prune:: Delete all gone branches. + Prints a list of deleted branches including a command to restore the branch as long as the referenced commit is still in the reflog.


-f:: --fetch:: Run git fetch --prune --all first.

-v:: --verbose:: Print detailed progress when fetching.

-V:: --version:: Print the version number and exit.

Exit status

0 on success, non-zero otherwise.


Please report bugs to https://github.com/swsnr/git-gone/issues/new.

See also


All credits for the idea go to Eugene Yokota (see http://eed3si9n.com/):

Copyright 2018-2020 Sebastian Wiesner sebastian@swsnr.de

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


~311K SLoC