Categories
Dev

Git: How to replace the master branch

It happens to all of us, we accidentally commit something into a git repo that we didn’t mean to, even worse we also pushed it to the main repository on GitLab or GitHub.

TL;DR — too long; didn’t read

Replace the current “master” branch with another “backup” branch.

Local: git branch -f master backup

Remote: git push origin +backup:master

via: StackOverflow
Categories
Computer Science

Setting up your DEV machine in ONE script

A new computer is great 💻🎉 – It’s a clean slate. It’s snappy. It’s great… but it is missing all the tools I rely on every day! My work requires me to jump around in a variety of tools and technology stacks, hence I need to install a lot of different tools and be able to support different development environments.

Existing package manager for CLI tools

Over time developers load command line tools like people are buying toilet paper these days. From maven, via tl;dr, stopping at kubectl to tmux. We use all of those little nifty tools. Hence setting up a new machine can seem scary task at times, but fear not! For CLI tools we solved that problem long long ago with Homebrew, or as you probably know it: brew
(The windows folks probably know Chocolatey)

You can install maven for example by running: brew install maven

Fear not! The same tool that installs CLI tools can install (almost) all our applications!

me

Brew can do more!