Open in app
Praj Basnet
1 Follower
About

Sign in

1 Follower
About
Open in app

Git pull and automatically detect the current branch

Praj Basnet

Praj Basnet

·Nov 26, 2020

Handy little shortcut I use when I run git pull so I don’t have to specify the current branch:

git pull origin $(git rev-parse --abbrev-ref HEAD)

I make this an alias of git pull so that I always get the branch first.

  • Git
  • Code
  • Software Developmen
  • Version Control

More from Praj Basnet

More From Medium

How to Talk, So Your Operating System Will Listen…How to Listen, For When Your OS Talks

Bre Rickner

Handling API Errors with Airflow

Nathan Lim in StashAway Engineering

Digital Transformation Buildout Lessons — Lean Management and Monitoring Part 3: Visual Management

Ravi Shankar in Engineered @ Publicis Sapient

Process Stability Analysis with Python

Roberto Salazar in The Startup

Understanding Java’s Everyday System.out.println();

Blake Sanie

Hackathon Sprint — Approach Projects Differently

Zdenek Letko in Wandera Engineering

Scastie provides an easy start for learning Scala

Alonso Del Arte

A Gentle Introduction to Amazon Web Services — Simple English Explanations for Product Categories

Sunny Singh

About

Help

Legal

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