Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/kiprasmel/git-rebase-diff

git range-diff, but works automatically after a rebase
https://github.com/kiprasmel/git-rebase-diff

git range-diff rebase sanity-check

Last synced: about 2 months ago
JSON representation

git range-diff, but works automatically after a rebase

Awesome Lists containing this project

README

        

git-rebase-diff
===============

a tiny wrapper around git range-diff,
to make it easy to use after performing a rebase.

esp useful if encountered merge conflicts
& want to verify that nothing screwed up.
see also: https://github.com/kiprasmel/git-diff3c

setup
-----

```
git clone https://github.com/kiprasmel/git-rebase-diff.git
# or: git clone [email protected]:kiprasmel/git-rebase-diff.git

cd git-rebase-diff

cp git-rebase-diff /usr/local/bin/

git config --global init.defaultBranch=master # or whatever branch you use as default
```

usage
-----

expects that you:
- are checked out in the branch you rebased.
- have *not* pushed the branch to the remote yet.

```
git-rebase-diff
git-rebase-diff [-r|--remote origin] [-p|--parent-branch master] [-d|--debug]
git-rebase-diff [-r|--remote origin] [-p|--parent-branch master] [-d|--debug] -- [range-diff args]...
```

environment variables
---------------------

configure the defaults via:

- GIT_REBASE_DIFF_DEFAULT_REMOTE
- GIT_REBASE_DIFF_DEFAULT_PARENT

git config
----------

respects:

- init.defaultBranch

see also
--------

- man git-range-diff
- https://github.com/kiprasmel/git-diff3c

---

update
------

i've been experimenting with revision syntax.
there's some work in the `experiment' branch; not ready yet.
in the meantime, one can try:

- git range-diff @{1}...
- to get the range diff of HEAD vs last version of HEAD
- use `@{n}' to get HEAD vs `n'th-previous version of HEAD

- git range-diff @{u}...
- to get the range diff of HEAD vs remote HEAD
- use `@{u}@{n}' to get HEAD vs `n'th-previous version of remote HEAD