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

An experience of unit testing with the Arrange, Act, Assert (AAA) pattern: Part II

Nelson Wright

Why and When Are Interfaces Useful?

Marcelo Valls in The Startup

Write Your Own OS(3) — Bare Bone OS

Meg's tech corner

Walrus Operators in Python

Martin McBride in The Startup

Begin building your own CMS in just minutes! (code-along)

Felipe Bohorquez

Adventures in building custom datasets via Web Scrapping / Spotify API — Octane Playlist (37)…

Slaps Lab

Need faster code? Try Multithreading

Sun-Li Beatteay in HackerNoon.com

From .rodata to .rwdata- an introduction to memory mapping and LD scripts

Guy Ezer in The Startup

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