Monday, 22 May 2023

On the subject of aliases ...

I'm a super-massive fan of time/labour saving devices, and that goes for command-line tips n' tricks to save me: -

(a) typing more stuff

(b) looking in my notes to remember what I need, in order to type more stuff

Therefore, I've finally got around to creating an alias to create a new branch in a GitHub repo that I've cloned to my Mac.

I've added this alias to ~/.zprofile: -

gitbranch='git fetch origin && git rebase origin/master && git checkout master; git checkout -b $1'

so now I just need to type: -

gitbranch foobar

or: -

gitbranch snafu

in order to create a new branch ...

Which is nice.

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...