Skip to content

Git version control utility, Illustrates differences between current working branch and master branch

License

Notifications You must be signed in to change notification settings

fstab50/branchdiff

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


branchdiff


About this repository


Contents

--

back to the top


Summary

branchdiff is a utility for use with git version control. The program:

  • Instantly see differences between current working branch and any other branch
  • Access advanced git functionality without any code or typing syntax
  • Graphical view of when commits were made to the current branch, by whom
  • Graphical merge maps

branchdiff default view

back to the top


Supported Linux Distributions

  • Ubuntu 18.04, 20.04, 20.10, 22.04
  • Linux Mint 18, 19, 20, 21
  • Debian variants of Ubuntu / Linux Mint distributions above
  • Redhat 7,8+
  • CentOS 7, 8+

back to the top


Installation


Ubuntu, Linux Mint, Debian variants

The easiest way to install branchdiff is via the Debian-tools repository:

  1. Download the public key:

    $ wget -qO - http://awscloud.center/keys/public.key | sudo apt-key add -
    
  2. Install the repository:

    $ sudo echo "deb [arch=amd64] http://deb.awscloud.center <distribution> main" > \
                 /etc/apt/sources.list.d/debian-tools.list
    

    Where: <distribution> is one of the following:

    • trusty: Ubuntu 14.04, Ubuntu 14.04 based Linux distributions
    • xenial: Ubuntu 16.04, 16.04 based Linux distributions
    • bionic: Ubuntu 18.04, 18.04 based Linux distributions (Linux Mint 19, etc)
    • cosmic: Ubuntu 18.10, 18.10 based Linux distributions
  3. Verify debian-tools repository installation

    $  grep ^ /etc/apt/sources.list /etc/apt/sources.list.d/*
    

    repository-contents

  4. Update and install the package:

    $ sudo apt update  &&  sudo apt install branchdiff
    
  5. Verify Installation. To verify a Debian (.deb) package installation:

    $ apt show branchdiff
    

    apt

back to the top


Redhat, CentOS, Fedora, Amazon Linux

The easiest way to install branchdiff on redhat-based Linux distributions is via the developer-tools package repository:

  1. Download and install the repo definition file

    $ sudo yum install wget
    

    rpm-install1

    $ wget http://awscloud.center/rpm/developer-tools.repo
    
    $ sudo mv developer-tools.repo /etc/yum.repos.d/  &&  sudo chown 0:0 developer-tools.repo
    
  2. Update local repository cache

    $ sudo yum update -y
    
  3. Install branchdiff os package

    $ sudo yum install branchdiff
    

    rpm-install2

    Answer "y":

    rpm-install3

  4. Verify Installation

    $ yum info branchdiff
    

    rpm-install4

back to the top


Upgrading


  1. See if an upgrade is available, update your distribution's package repositories:
$  sudo apt update
  1. Issue a list command to see upgrades. Alternatively, you may issue $ sudo apt upgrade command.
$  apt list branchdiff -a

repo-contents

  1. Upgrade
$  sudo apt upgrade

back to the top


Options

To display the help menu:

    $ branchdiff  --help

branchdiff help

back to the top


Screenshots


Screenshots / Working Branch Status

branchdiff provides the status of working branch of the current git repository in which the cursor is located:

$ cd <git repository root directory>
$ branchdiff

branchdiff1

back to the top


Screenshots / Extended commit history

~/xlines$ branchdiff

branchdiff1

back to the top


Screenshots / Commit Log / history

branchdiff accurately provides the commit age of the working branch where the cursor is located:

$ branchdiff --commit-log history

commitlog-history

back to the top


branchdiff accurately provides the commit age of the working branch where the cursor is located:

Simple repository with minimal branches and merges:

$ branchdiff --commit-log detail

commitlog-history

Git repository with many working branches and complex merge cadence:

$ branchdiff --commit-log detail

commitlog-history

back to the top


Screenshots / Code Diff

When used without a subcommand, the code option (--code) triggers branchdiff to show the lines changed in all files updated in the current working branch compared to the master branch.

$ branchdiff --code

branchdiff-code

back to the top


Screenshots / Code Diff <filename>

Pressing the tab key twice autocompletes the names of all files that received updates in the current working branch.

$ branchdiff --code <tab><tab>

Ansible/deploy_configuration.yml                       Code/core/ec2prices.py
attribute_defs.yml                                     Code/core/__init__.py
cloudformation/dynamodb-table.template.yml             Code/core/parameter_processing.py
cloudformation/serverless-monitor.template.yml         Code/core/_version.py
Code/connectors/dynamodb.py                            Code/index.py
Code/connectors/__init__.py                            Jenkinsfile
Code/connectors/table.py                               Makefile
Code/core/dynamodb.py                                  requirements.txt

A filename can be selected by typing the first few characters:

$ branchdiff --code Code/con... <tab><tab>
$ branchdiff --code Code/connectors/table.py

branchdiff-code

back to the top


Author & Copyright

All works contained herein copyrighted via below author unless work is explicitly noted by an alternate author.

  • Copyright Blake Huber, All Rights Reserved.

back to the top


License

  • Software contained in this repository is licensed under the MIT License. A copy of the license agreement is included with this repository here.

back to the top


Disclaimer

The following code is provided in accordance with the strict legal disclaimer below:

Code is provided "as is". No liability is assumed by either the code's originating author nor this repo's owner for their use at AWS or any other facility. Furthermore, running function code at AWS may incur monetary charges; in some cases, charges may be substantial. Charges are the sole responsibility of the account holder executing code obtained from this library.

Additional terms may be found in the complete License Agreement.

back to the top


About

Git version control utility, Illustrates differences between current working branch and master branch

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published