Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pull should remove local branches pruned from remote if they do not contain diverging changes #118

Closed
zombiezen opened this issue Aug 27, 2020 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@zombiezen
Copy link
Member

Basically, the logic should be that if there was a remote tracking ref that matches the name of a local branch and that gets pruned during a pull, the local branch should be removed if there are no divergent commits.

@zombiezen zombiezen added the enhancement New feature or request label Aug 27, 2020
@zombiezen zombiezen added this to the 1.1 milestone Aug 27, 2020
@zombiezen
Copy link
Member Author

Questions to be answered:

  • Does this happen for any remote or just origin? If the latter, why? Perhaps this should check whether the branch is present in other remotes before pruning?
  • When pruning, rather than wholly removing, perhaps we just move the branch to a refs/gg-old/BRANCH namespace. The user can periodically clean these out when they want to, but at least there's separation.

@zombiezen zombiezen modified the milestones: 1.1, 1.2 Dec 13, 2020
zombiezen added a commit that referenced this issue Feb 24, 2022
Version 1.2 includes features to handle repositories with lots of branches.

### Added

- gg can now be installed via [Nix](https://nixos.org/)!
  See https://gg-scm.io/install for instructions.
- `push` and `commit` have a new `-hooks=0` flag.
  ([#153](#153))
- `pull` has a new `--force-tags` flag.
  ([#155](#155))
- `branch` has a new `--pattern` flag to filter listed branches.
  ([#156](#156))

### Changed

- Local branches are moved under `refs/gg-old/` during `pull`
  when they are deleted from a remote.
  ([#118](#118))

### Fixed

- `GIT_EDITOR` is now always invoked from the root of the working copy
  to match with the behavior of Git.
  ([#152](#152))
- `revert` now prints an error message
  if used on a nonexistent file in a new repository.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant