Open in app
Praj Basnet
1 Follower
About

Sign in

1 Follower
About
Open in app
Image for post
Image for post

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

4 Simple SASS Techniques to Clean Up Your Code

Matt Maribojoc in The Startup

Limiting concurrent operations in JavaScript

Maciej Cieślar in freeCodeCamp.org

Flask — Host Your Python Machine Learning Model On Web

Farhad Malik in FinTechExplained

Insecure Deserialization Explained With Examples In Java

Tomas Tulka

How to Write Python Decorators That Take Parameters

Yong Cui in Better Programming

5 Interesting PyTorch Functions for beginners

Priyansh Warke

iOS 12: Notable UIKit Additions

Jordan Morgan in The Traveled iOS Developer’s Guide

9 Career Tips for Embedded Software Developers

Yahya Civelek in Better Programming

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