Posts Tagged ‘terminal’

Printing Unity output to console cout instead of to a log file

Tuesday, October 25th, 2016

When invoking Unity from the command line it will by default not print its output to the console.
You can make it log its output to a log file by using the -logFile unityBuild.log parameter, but if you want it to print its output instead of saving it you can simply omit the path after the -logfile parameter:

Unity.exe -batchmode -quit -logFile

Setup SSH keys on Mac

Tuesday, July 26th, 2016

Generate SSH keys, defaults at ~/.ssh/id_rsa and

ssh-keygen -t rsa -b 4096 -C ""

Run Mac’s ssh-add command (not ssh-agent), adds default keys if no key is specifed, -K adds passphrases to keychain.

ssh-add -K

Create a text file called ~/.ssh/config with this content:

Host *
  UseKeychain yes
  AddKeysToAgent yes
  IdentityFile ~/.ssh/id_rsa

Git diff branch only

Tuesday, May 17th, 2016

To see only the differences between master and branch from when they diverged (pull request style) do

git diff master...branch #note: three dots

To see all differences between master and branch do

git diff master..branch #note: two dots

Note that master or branch can be replaced with any ref like head depending on which branch you have checked out.