Delete old branches in Git

╭─asit@gandua ~/stringify ‹master*›
╰─$ git branch
ci-build-script
dev
* master
remotes/origin/add-license-1
remotes/origin/benchmark
╭─asit@gandua ~/stringify ‹master*›
╰─$ git merge-base ci-build-script master
e3b47d97284b911baa266853b208f5ea25115e67
╭─asit@gandua ~/stringify ‹master*› 
╰─$ git log — pretty=format:”%ad” — date=short -n 1 e3b47d97284b911baa266853b208f5ea25115e67
2017–09–25
╭─asit@gandua ~/stringify ‹master*›
╰─$ git log — pretty=format:”%cr” — date=short -n 1 e3b47d97284b911baa266853b208f5ea25115e67
6 months ago
╭─asit@gandua ~/stringify ‹master*› 
╰─$ git log — pretty=format:”%ad” — date=short -n 1 ci-build-script
2017–09–26
╭─asit@gandua ~/stringify ‹master*›
╰─$ git log — pretty=format:”%cr” — date=short -n 1 ci-build-script
5 months ago
╭─asit@gandua ~/stringify ‹master*›
╰─$ git log --pretty=format:"%s" -n 1 ci-build-script
gcc tnd clang config for travis
git branch -d ci-build-script
╰─$ git-clean-local-branches 
Branch name : ci-build-script
Created on : 2017–09–25(6 months ago)
Last updated on : 2017–09–26(5 months ago)
Last commit message : gcc tnd clang config for travis
Branch name : dev
Created on : 2017–10–14(5 months ago)
Last updated on : 2017–11–25(4 months ago)
Last commit message : stringify improvement, size and type name removal
Branch name : remotes/origin/add-license-1
Created on : 2017–10–14(5 months ago)
Last updated on : 2017–10–14(5 months ago)
Last commit message : Create LICENSE
Branch name : remotes/origin/benchmark
Created on : 2017–10–06(5 months ago)
Last updated on : 2017–10–16(5 months ago)
Last commit message : cxx-pretty print integration
╭─asit@gandua ~/stringify ‹master*› 
╰─$ git-clean-local-branches -fi
Branch name : ci-build-script
Created on : 2017–09–25(6 months ago)
Last updated on : 2017–09–26(5 months ago)
Last commit message : gcc tnd clang config for travis
Delete the branch, followed by [y/n]? y
Deleted branch ci-build-script (was 2cb728c).
Branch name : dev
Created on : 2017–10–14(5 months ago)
Last updated on : 2017–11–25(4 months ago)
Last commit message : stringify improvement, size and type name removal
Delete the branch, followed by [y/n]? y
Deleted branch dev (was f8698b4).

--

--

--

C++11/14, Qt, Juce

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

My Journey through KWoC 2018

How to Autoscale Kubernetes Pods based on ingress request — prometheus, keda, and k6

Python影像辨識筆記(二十九):Zero-Shot Classification —  Latent Embedding Feedback and Discriminative…

Validate a Code Identifier in Java

Drupal 9 Porting Weekend

2.1 Program structure

Problem solving like a programmer

What is Context in Koajs

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Asit Dhal

Asit Dhal

C++11/14, Qt, Juce

More from Medium

Multiple git configs (profiles) on one computer

All you need to know about Git to get started with it | Git basics | Git for Beginner

Git homepage, options for different operating system

How to discard an unstaged change with hunk edit mode

The grammar of Code