git-jump: Move a git branch

[ bsd3, development, program ] [ Propose Tags ] [ Report a vulnerability ]

Move a git branch to a specified refspec (or to the upstream position) Along with any uncommited changes. Foregoing any committed changes. Meant to be a safer replacement for `reset --hard` to jump branch tips.


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

  • No Candidates
Versions [RSS] 0.1.0.0, 0.1.0.1, 0.1.0.2, 0.1.0.3
Dependencies base (>=4 && <5), base-compat (>=0.8 && <0.9), process (>=1.0.1.1) [details]
License BSD-3-Clause
Copyright Eyal Lotem
Author Eyal Lotem
Maintainer eyal.lotem@gmail.com
Category Development
Home page https://github.com/Peaker/git-jump
Source repo head: git clone https://github.com/Peaker/git-jump
Uploaded by EyalLotem at 2015-11-22T10:10:23Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables git-jump
Downloads 2719 total (0 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2016-11-30 [all 4 reports]

Readme for git-jump-0.1.0.3

[back to package description]

git-jump

Moving to a new position

When you decide that the current branch needs to use a different hash and content, currently you need to reset --hard to the new position.

However, reset --hard has the annoying side-effect of deleting any outstanding work.

It would be nice to be able to jump the tip of the current branch to a new position and update the working tree, as long as there's no overlap between files changed in the working tree and in the diff to the remote location.

Just type:

git-jump <refspec>

To jump to the new location.

Updating a local tracking branch with no local commits

When you have a local branch that is tracking a remote branch (and has no local commits) that was rebased, you would have to reset --hard to the remote location. This requires typing out the name of the upstream branch (or "@{u}" at least), and as usual, loses any uncommitted changes.

Just type:

git-jump

With no parameters, and it will jump to the upstream location, taking any uncommitted changes on top.