zachfeldman/git_print — pull request #1 by nickyleach (2013-07-25 18:26:54+00:00)
Title: Simplify .bash_profile changes

There's no need to modify your `.bash_profile` from _inside_ your `.bash_profile`. This is going to cause your `.bash_profile` to grow every time you source it. Eek!

```
# .bash_profile
echo "hi" >> ~/.bash_profile
```

```
$ source ~/.bash_profile
$ cat ~/.bash_profile
# .bash_profile
echo "hi" >> ~/.bash_profile
hi
$ source ~/.bash_profile
$ cat ~/.bash_profile
# .bash_profile
echo "hi" >> ~/.bash_profile
hi
hi
```

Also, `>>` appends to the file whereas > overwrites the file completely.

```
$ touch foo
$ cat foo
$ echo 'bar' >> foo
$ cat foo
bar
$ echo 'baz' >> foo
$ cat foo
bar
baz
$ echo 'qux' > foo
$ cat foo
qux
```