<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git-checkout-history/git-checkout-store, branch master</title>
<subtitle>Stores history of git branches recently checked out and provides a way to quickly return to those branches</subtitle>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/'/>
<entry>
<title>git-checkout-store: Take arbitrary arguments</title>
<updated>2014-12-27T00:33:07+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2014-12-27T00:30:53+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/commit/?id=4148c1408564d2353a43d78dcc9aab0d480a38fd'/>
<id>4148c1408564d2353a43d78dcc9aab0d480a38fd</id>
<content type='text'>
Allow arbitrary arguments to be inputted. This allows us to take flags
and pass them on directly to `git-checkout`. We can now for example do

    git checkout-store -b some-new-branch

and the command will work the same way as `git-checkout` with the added
benefit of storing the branch in history.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allow arbitrary arguments to be inputted. This allows us to take flags
and pass them on directly to `git-checkout`. We can now for example do

    git checkout-store -b some-new-branch

and the command will work the same way as `git-checkout` with the added
benefit of storing the branch in history.
</pre>
</div>
</content>
</entry>
<entry>
<title>git-checkout-store: Use Print instead of Println for cmd output</title>
<updated>2014-12-27T00:19:15+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2014-12-27T00:19:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/commit/?id=d77af4ce1538f9da5e51e3ecb15a24bbe90358e5'/>
<id>d77af4ce1538f9da5e51e3ecb15a24bbe90358e5</id>
<content type='text'>
Since we're just outputting the output of `git-checkout`, there's
already a newline at the end. We don't want to output an extra one, so
just send the `git-checkout` output to the screen verbatim.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we're just outputting the output of `git-checkout`, there's
already a newline at the end. We don't want to output an extra one, so
just send the `git-checkout` output to the screen verbatim.
</pre>
</div>
</content>
</entry>
<entry>
<title>git-checkout-store: Print `git checkout` stderr output</title>
<updated>2014-12-27T00:17:35+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2014-12-27T00:17:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/commit/?id=ea03b4335528cf741b29df1403680f11e56722b1'/>
<id>ea03b4335528cf741b29df1403680f11e56722b1</id>
<content type='text'>
Turns out `git checkout` prints to STDERR instead of STDOUT. Grab the
STDERR output and print that to the screen so we can see the "Switched
to branch 'x'" text when using `git checkout-store`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Turns out `git checkout` prints to STDERR instead of STDOUT. Grab the
STDERR output and print that to the screen so we can see the "Switched
to branch 'x'" text when using `git checkout-store`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Move branch storage to utils package</title>
<updated>2014-12-06T23:44:51+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2014-12-06T23:42:03+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/commit/?id=cd4a62fbbd0d8f89c6ab7e9e0d92d86f3442cfbd'/>
<id>cd4a62fbbd0d8f89c6ab7e9e0d92d86f3442cfbd</id>
<content type='text'>
Create utils package and move everything related to branch creation into
the utils.go file. Then call `utils.Store` to store a branch.

Doing this so I can easily store a branch in history from a
`git-checkout-history` call. This is because we want to save to history
even if you're checking out using the history shorthand.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create utils package and move everything related to branch creation into
the utils.go file. Then call `utils.Store` to store a branch.

Doing this so I can easily store a branch in history from a
`git-checkout-history` call. This is because we want to save to history
even if you're checking out using the history shorthand.
</pre>
</div>
</content>
</entry>
<entry>
<title>git-checkout-store: Prepend to the branch list</title>
<updated>2014-12-06T22:55:51+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2014-12-06T22:55:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/commit/?id=f8066036afc09e07a17e77df430b0d5aac4e9240'/>
<id>f8066036afc09e07a17e77df430b0d5aac4e9240</id>
<content type='text'>
Instead of appending to the end of the branch list, prepend so the 0th
element is the last branch checked out.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of appending to the end of the branch list, prepend so the 0th
element is the last branch checked out.
</pre>
</div>
</content>
</entry>
<entry>
<title>git-checkout-store: .git-checkout-historyrc -&gt; .git-checkout-history</title>
<updated>2014-12-06T22:47:56+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2014-12-06T22:47:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/commit/?id=8d512419cc137a2c5f9fa8a1d77fa60e1474f4a6'/>
<id>8d512419cc137a2c5f9fa8a1d77fa60e1474f4a6</id>
<content type='text'>
Rename the data file because it's not actually an rc file, it's a data
storage file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rename the data file because it's not actually an rc file, it's a data
storage file.
</pre>
</div>
</content>
</entry>
<entry>
<title>git-checkout-store: Store branch in YAML file</title>
<updated>2014-12-06T22:45:51+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2014-12-06T22:43:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/commit/?id=2b091e1072c62f0a6ac35349ac2a899e038b099c'/>
<id>2b091e1072c62f0a6ac35349ac2a899e038b099c</id>
<content type='text'>
Take the branch parameter and store it in a `branches` array in our YAML
rcfile.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Take the branch parameter and store it in a `branches` array in our YAML
rcfile.
</pre>
</div>
</content>
</entry>
<entry>
<title>git-checkout-store: Create an rc file if it doesn't exist</title>
<updated>2014-12-06T18:45:27+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2014-12-06T18:45:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/commit/?id=a0d213e24d90bfe95342efd57cf560ae2c1996e1'/>
<id>a0d213e24d90bfe95342efd57cf560ae2c1996e1</id>
<content type='text'>
Make a `.git-checkout-historyrc` file in the current user's home
directory if the file doesn't exist.

Resources:
- [Path to home
  directory](http://stackoverflow.com/questions/7922270/obtain-users-home-directory)
- [Cross-compilation version](https://github.com/mitchellh/go-homedir)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Make a `.git-checkout-historyrc` file in the current user's home
directory if the file doesn't exist.

Resources:
- [Path to home
  directory](http://stackoverflow.com/questions/7922270/obtain-users-home-directory)
- [Cross-compilation version](https://github.com/mitchellh/go-homedir)
</pre>
</div>
</content>
</entry>
<entry>
<title>git-checkout-store: go fmt</title>
<updated>2014-12-06T17:15:37+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2014-12-06T17:15:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/commit/?id=de67895ad542d70a302e5098d63ca9248fde813b'/>
<id>de67895ad542d70a302e5098d63ca9248fde813b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>git-checkout-store: Try to output STDOUT from git-checkout</title>
<updated>2014-12-06T17:12:07+00:00</updated>
<author>
<name>Teddy Wing</name>
</author>
<published>2014-12-06T17:12:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.teddywing.com/git-checkout-history/commit/?id=c493950671962631eb87373388dd3fe3257cf4f7'/>
<id>c493950671962631eb87373388dd3fe3257cf4f7</id>
<content type='text'>
Not working. What I want is to output `Switched to branch 'a-branch'`
from git-checkout.

Using the example from: http://golang.org/pkg/os/exec/#Command
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not working. What I want is to output `Switched to branch 'a-branch'`
from git-checkout.

Using the example from: http://golang.org/pkg/os/exec/#Command
</pre>
</div>
</content>
</entry>
</feed>
