Checkout a branch by its id
Maria Michou

Maria Michou @maria_michou

About: Software Engineer, mostly back-end, strong advocate for quality code.

Joined:
Nov 13, 2017

Checkout a branch by its id

Publish Date: Jul 25 '18
7 0

When you're working on or peer reviewing or testing, etc more than 2 branches, it's difficult to remember the exact name of every branch and copy/paste is an inefficient option. So, since it's relatively easy to remember the number (id) of the story, we could come up with an alias or better a function to add to our .bashrc, .zshrc or wherever we keep our favourite aliases.

For that, we need to know the id of the branch we want to checkout.
E.g. if the branch is: prefix/PPRJ-123/name-of-the-task, then the id is 123.
Also, we assume the id is unique for the repository.

Gist:

Comments 0 total

    Add comment