Stackify copyrighted

Today I Learn: Checkout from your remote branch

Well, it’s not a geeky tips but it works

Mochamad Iqbal Dwi Cahyo
Jul 10 · 2 min read
git checkout --track [remote]/[branch]

With this, you don’t have to manually checkout from or to a local branch, then do a git pull ways. The above commands will save us a tremendous time to directly getting our hands dirty and wet.


You might also be wondering didn’t this command has the same purpose with below

git checkout -b [mybranch] [remote]/[branch]

Well, the answer is yes, but the command designed for different cases.

  1. --track solely to directly match the branch name and HEADs from the remote
  2. -b [mybranch] same purpose but with little extra feature to customize or rename our branch.

Easyread

Easy read, easy understanding. A good writing is a writing that can be understood in easy ways

Mochamad Iqbal Dwi Cahyo

Written by

A geek enthusiast. Sometimes photographer, culinary seeker or traveler. He ready to craft ideas!

Easyread

Easyread

Easy read, easy understanding. A good writing is a writing that can be understood in easy ways

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade