Tagged “commandline”

git pull, but discard conflicting local changes

A situation I encounter frequently is one where Unity has made local changes and I need to do a git pull. One or more of the local changes will get overwritten, blocking the merge. I don’t particularly care about this file as I didn’t manually edit it and I just need to get the latest code.

macOS terminal color based on current directory

Recently, I’ve had to juggle multiple copies of a git repo because reasons. This has inevitably led to me accidentally running commands in the terminal in the wrong copy. So, to avoid this, I’ve written a bash profile script that will set my terminal windows to different colors based on the present working directory.