Useful Git Aliases

If you’re a software developer, you most likely use git. Many people are not aware that you can create an alias for commands. Creating alias will make commands easier to remember and quicker to type. Here are some of my favorite git alias I use on a regular basis.

Short for git status

alias gs="git status"

Quickly commit with wip message

alias wip='git add . && git commit -m "wip"'

Updates your branch and submodules

alias gpa = "!git pull --rebase --prune [email protected] && git submodule update --init --recursive"

Reset all changes (use with caution)

alias nah="git reset --hard && git clean -df"

 

Leave a comment below on your favorite alias commands.

Alternatives to Google Url Shortener

About a year ago, Google announced they would be shutting down their URL shortener service March 30, 2019. Goo.gl has been around since 2009. This is unfortunate because so many people rely on goo.gl for creating short links. Bit.ly is a good choice if you need to shorten a few URLs, but once you go over the free plan (10,000 a month), you have to upgrade to their enterprise edition which cost around $1,000 a month.

Fortunately, there are a few free options such as tinyurl, is.gd, to.ly, and cutt.ly. Also, there are extensions such as Link Shortener, that allow you to shorten links in one click using multiple different shorteners. If you have a need to shorten URLs, give  Link Shortener a try!

How to Stop Developer Tools Prompting For Password

After updating to macOS Mojave, I started getting a prompt for a user name and password everytime I debugged golang in GoLand. This was frustrating but I was able to stop it from prompting by running this command in my terminal:

sudo /usr/sbin/DevToolsSecurity --enable

Once I ran this command, I stopped seeing the prompt for “Developer tools access needs to take control of another process for debugging to continue. Type your password to allow this.”

Hopefully, this works for you!

VMware Fusion Ctrl Click Issues

The default configuration for running windows inside of VMware Fusion on a mac is to have ctrl + left click act as a right click. This can cause issues when trying to select multiple files etc. Fortunately, this setting is easily disabled in the Keyboard and Mouse settings for the virtual machine.

  1. Go to settings
  2. Go to Keyboard & Mouse settings.
  3. Edit the Windows 10 profile
  4. Uncheck the option for Secondary Button
  5. Save and exit

This simple fix will save you a lot of frustration. Hope it help!