Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

shell script get branch name

#!/bin/bash
echo $(git symbolic-ref --short HEAD)
Comment

shell script get branch name

#!/bin/bash

branch=$(git symbolic-ref --short HEAD)

echo
echo "**** Running post-commit hook from branch $branch"
echo
Comment

PREVIOUS NEXT
Code Example
Shell :: pm2 start remix app 
Shell :: como fazer commit github 
Shell :: host key verification failed 
Shell :: git return to last commit 
Shell :: kill port 3000 ubuntu 
Shell :: problem detected port 80 in use by unable to open process with pid 4 
Shell :: : Failed to start A high performance web server and a reverse proxy server. -- Subject: A start job for unit nginx.service has failed 
Shell :: git clone the certificate chain was issued by an authority that is not trusted 
Shell :: shell set environment variable 
Shell :: install bootstrap in gatsbyjs 
Shell :: docker compose rebuild image 
Shell :: button click event powershell 
Shell :: enable rdp powershell 
Shell :: give executable permission to a file 
Shell :: check maven version in ubuntu 
Shell :: open calculator from command line MacOS 
Shell :: how to make a .sh file executable 
Shell :: unable to install mongodb on ubuntu 22.04 
Shell :: mongorestore command 
Shell :: set name and email git 
Shell :: how to switch another branch in git 
Shell :: install rollup locally 
Shell :: git ignore 
Shell :: powershell show only current directory 
Shell :: powershell merge multiple text files 
Shell :: git update 
Shell :: check file sytem linux 
Shell :: multiple kubeconfig in one file 
Shell :: how to get list of files in a folder in batch script 
Shell :: git lfs install 
ADD CONTENT
Topic
Content
Source link
Name
5+5 =