How to Tag and Push a Release with Git
Set the `-a` and the `-m` flags like so git tag -a v1.0.0 -m "Note about the release goes here" Then to push the tag to a repository git push origin --tags And that's it! Here are the docs [https://git-scm.com/book/en/v2/Git-Basics-Tag...
Written by Sean Behan on 11/29/2017
Color Output with Test:Unit, AutoTest and Ruby 1.9
If you are testing using Test:Unit (rather than RSpec) and you're using Ruby 1.9.* colorized output of your tests using Autotest will not be immediately available. Since, 1.9 comes with mini test the test/unit/ui/console/testrunner.rb script is not loaded...
Written by Sean Behan on 06/17/2012
How to Recover a Mistakenly Deleted Branch
Workflow git checkout -b _new_branch_name # do some work and commit changed git checkout master git branch -d _new_branch_name # doh... i meant to merge first Fortunately, you can easily recover from this mistake. git reflog 395b1ea HEAD@{0}: checkout...
Written by Sean Behan on 06/17/2012
Git Feature Branch Naming Strategy
There are only two hard things in Computer Science: cache invalidation and naming things. -- Phil Karlton Typically, we have three main branches at any given time in a project lifecycle. master, development and staging. Master is production ready code, d...
Written by Sean Behan on 06/17/2012
Git Untrack Already Tracked Files
To remove files that are currently being tracked by git, you have to remove them from the "cache". Note, doing this will NOT delete the file on your local machine. It will still be there but not be tracked. git rm -r --cached supersecretpasswords.txt Yo...
Written by Sean Behan on 06/17/2012
Git: How to Delete a Branch with an Invalid Name
If you've named a branch beginning with two dashes "--", you're sort of in trouble because git interprets your branch name as a switch/flag. You can skip switches all together by supplying two dashes before your branch name git branch -d -- --index_for_...
Written by Sean Behan on 06/17/2012
How to Remove Your Last Git Commit
Remove your last commit (if you haven't pushed yet) git reset --hard HEAD~1 To see changes that have been committed and their position in HEAD git reflog And to undo your previous reset and advance the cursor to the reference immediately behind the cu...
Written by Sean Behan on 06/17/2012
Launch Photoshop (Or Any App) From The Command Line on Mac OS X
I often find myself coding with the terminal open. Cding around a web app project I usually end up at some point launching Photoshop. Either to touch up or work on a psd, png, jpg ...etc. I fire up Photoshop and then navigate to the app's public directory...
Written by Sean Behan on 06/17/2012
Very Basic Git Workflow
Very, very basic git workflow git pull git branch dev_branch git checkout dev_branch #make some changes git checkout master git merge dev_branch git branch -d branch_to_delete git push
Written by Sean Behan on 06/17/2012