Tag Archives: Tips

Changing SourceTree’s Default Remote

I’m going to talk about changing SourceTree’s default remote.

When you’re pushing a new branch, SourceTree will automatically guess which remote you wish to push to by default.

SourceTree defaults to origin

By default SourceTree will always pick origin to push a new branch to. Depending on your workflow, you may want to set another remote as your default, let’s say my-fork for instance.

SourceTree defaults pushing new branches to origin

Renaming a remote

Interestingly all we have to do is rename our remotes. Since SourceTree always picks origin we just need to rename to anything else. Perhaps to the name of owner of the repo like SproutSocial or FaceBook. It’s safe to rename the remotes, it’s just a nickname only used locally.

(I’ve never been a fan of “origin“, it’s terribly confusing and ambiguous for those learning git).

Steps to rename the remote

via git

git remote rename origin SproutSocial

In SourceTree

  • Open the repo settings (gear in top right)
  • Remotes tab
  • Click on the remote
  • Edit
  • Change the Remote Name
SourceTree Remotes Setting
Editing remote names

Changing SourceTree’s Default Remote

Once we’ve renamed origin, SourceTree will always pick the remote that comes first alphabetically. So, do the ‘ol classic prefixed by numbers. Here I’ll name them 01-my-fork and 02-origin.

Boom! SourceTree picks 01-my-fork by default!

Changing SourceTree's Default Remote
Setting your preferred remote as default

Simple workflow optimizations like this, make me happy.

Tips: My Favorite Sublime 3 Packages

I primarily use Sublime as my code editor of choice; a bunch of us at Sprout Social do. It’s simple, clean, lightweight on system resources, and it has some pretty sweet packages. I’ve found a number of packages that increase my efficiency developing. Thought I’d share several of these personal favorite Sublime 3 packages.

If you’re on Sublime 2, upgrade to Sublime 3, it’s totally stable.

To get started you’ll need to install Sublime Package Control into Sublime. It’s fairly simple, and the you’re read to go. The “Package Control: Install Package” command will now be available in your command pallet via Cmd+Shift+P or Ctrl+Shift+P.

SublimeLinter

SublimeLinterBase package for all linters. Syntax error highlighting can greatly reduce the save-run-revise cycle time. Most IDEs already have syntax error highlighting, why not add it to Sublime?

There are many SublimeLinter packages. Browse through them find what fits your workflow. Be sure to follow each packages setup instructions, each will be a bit different.

My personal must have’s are:

  1. SublimeLinter-phplint
  2. SublimeLinter-jshint
  3. SublimeLinter-jsxhint
  4. SublimeLinter-csslint
  5. SublimeLinter-contrib-scss-lint

BracketHighlighter

BracketHighlighterAn even better bracket highlighting than what comes with Sublime. It also shows starting and ending brackets in the gutter, and can matching for [ ], ( ), { }, ” “, ‘ ‘, <tag> </tag>.

SideBarEnhancments

Give the context menu more options when right clicking on files in a project. Duplicate files, move, rename, etc.

DocBlockr

DocBlockrEasier creation of document blocks for functions, classes, methods. It’s intelligent and looks ahead to see what you’re documenting to pre-fill the base info (such as input parameters and what is returned). Documenting is now convenient.

Pro tip: use the Tab key to navigate through the generated documented block, no need to click or use arrow keys.

Shell-Turtlestein

Launch the terminal/command line right in the context of your project directly from Sublime.  Either as a new window or as its own panel within sublime.

GitGutter

Visually shows the diff since the last commit in the gutter.  At a glance you can see what lines are additions, modifications, or deletions.

Origami

Split Sublime into multiple horizontal and vertical panes for side-by-side work. Remove the need to switch between tabs or windows as frequently when comparing files.

TrailingSpaces

Highlights and helps cleanup end of line trailing spaces. Nobody likes them right? Or maybe we just don’t notice them.

 

There are many other great packages out there for Sublime : code snippets, theme,  and syntax highlighting. But these are just some of my favorites.

How to Speed up Siri

Wish Siri was faster?

Here is a nice setting tweak to speed up Siri and make her more responsive. I found disabling the Voice Feedback (so Siri doesn’t talk out loud), makes her snappier.

Downside: You will have to read the screen.

Settings > General > Siri > Voice Feedback
Change to: Handsfree Only

1. General
General
2. Siri
Siri
3. Voice Feedback
Voice Feedback
4. Change to Handsfree Only
Voice Feedback Handsfree Only to Speed up Siri

From my understanding, this probably bypass the need for Apple’s servers creating the verbal dictation audio, and having to transfer it over Cellular Data / Wifi to your device. Aka, time.

Reliability boost? Maybe.

As a bonus Siri overall seems more reliable as , I get a lot fewer “I’m unable to process your request right now” responses it seems. But you will have to find out for yourself there. But with out a doubt Siri is a bit faster.

Tip: Hibernate – Sleep – Shutdown

Just to clear things up, I though I would quickly go through the differences of Hibernate, Sleep, and a full shutdown of any computer.

RAM makes the all difference!

The main difference has to do with how RAM is being used. So let me give a quick understanding of what RAM is and how it is used.

RAM is temporary ‘running’ memory. When a computer is booting up, it really is loading all the necessary files to work over into RAM. Now RAM also used to remember what programs you have open, what web page you are one, what you have typed but haven’t saved yet, and so on. Simply put, it tires the state of thing.

Now we can dive into the differences.

Shutdown

Scraps all data in RAM, forgetting the state of things on screen, then powers off all components (RAM chip, CPU, keyboard, screen, wifi card, etc).

Sleep

Continues to supply a little power to RAM chip keeping the state of thing. But powers off all other components (CPU, keyboard, screen, wifi card, etc). This means it can pick up where it left off very quickly, just need to power on all other components. Mac Laptops are well known for this, windows can do it as well.

Hibernate

Saves a copy of everything in RAM to the hard drive. This allows it to scrap everything in RAM and powers off all components (RAM chip, CPU, keyboard, screen, wifi card, etc) this consuming no power. When powered back on, it can restore the state to RAM as it was from the Hard drive, picking up where it left off. It can take a bit longer to save and restore the RAM, the benefit is mainly no battery drain.

What is best?

Which is best to use? Well that’s up to you. For me it largely depends on how long I will be away. Sleep short, hibernate long, shutdown long or weekly.

A rhyming rule of thumb:
Out for a treat – then sleep
Out for a date – then hibernate
Out for weekend cool down – then shutdown

Nevertheless, now you know!