Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

can we store the name of the current branch in a variable in bash

branch_name=$(git branch | sed -n -e 's/^* (.*)/1/p')
Comment

PREVIOUS NEXT
Code Example
Shell :: git remote repo from the cmd prompt 
Shell :: powershell invert 
Shell :: mkdir NewDirectory and cd into it 
Shell :: The Things Network commands starting server local lorawan 
Shell :: Check for command’s result 
Shell :: Show error message and exit if $FOO is unset (or null) 
Shell :: kali linux disable root command 
Shell :: install Dirichlet Multinomial R package 
Shell :: kdevtmpfsi 
Shell :: calibre on centos terminal 
Shell :: list of keycode based on key selection 
Shell :: reuse branch name 
Shell :: xfce ubuntu server disable suspend 
Shell :: To install latest version of something with pip in python 
Shell :: postgre create user 
Shell :: yum update 
Shell :: linux compress a pdf 
Shell :: how to save file in linux 
Shell :: stop all docker machiens 
Shell :: github merge conflict 
Shell :: adb install aab 
Shell :: write command in linux 
Shell :: slack powershell command 
Shell :: lumbha ram github 
Shell :: powershell copy all images in a directory 
Shell :: tab to csv command line 
Php :: tinker color disabled 
Php :: laravel get project root 
Php :: check composer php version 
Php :: remove word from string php 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =