Skip to main content
Git script which shows little bit advanced status. Save with Preferred file name in /usr/local/bin/XX
branch=""
branches="git branch --list"
ESC_SEQ="\x1b["
COL_RESET=$ESC_SEQ"39;49;00m"
COL_RED=$ESC_SEQ"31;01m"
while read -r branch; do
clean_branch_name=${branch//\*\ /}
description=`git config branch.$clean_branch_name.description`
if [ "${branch::1}" == "*" ]; then
printf "$COL_RED$branch$COL_RESET $description \n"
else
printf " $branch $description\n"
fi
done <<< "$branches"
git status
Use the following command to add a description to your local branches.
git branch --edit-description

Comments

Popular posts from this blog

Dual Screen Script for Ubuntu

I have experienced problems when installing two monitors in Ubuntu. Following script will help you to solve this problem. I had problems when saving below values so I created a script and put it to the startup. #!/bin/sh xrandr --output VGA-0 --mode 1920x1080 --pos 1280x0 --rotate normal --output DVI-I-1 --off --output DVI-I-0 --mode 1280x1024 --pos 0x0 --rotate normal --output HDMI-0 --off

MYSQL Compare data in different Databases

Following statement will compare values in two databases and gives you records that not matched. SELECT stage,live,path,scope_id FROM ( SELECT (CASE WHEN (S.value = L.value) THEN '' ELSE 'N/M' END) as matched, S.scope_id, S.path, S.value AS 'stage', L.value AS 'live' FROM cin_stage.core_config_data S INNER JOIN cin_live.core_config_data L ON S.path = L.path ) RES WHERE matched = 'N/M' ORDER BY scope_id