

A few git tips you didn't know about - mtodd
http://mislav.uniqpath.com/2010/07/git-tips/

======
dlsspy
Inaccurate -- I wrote one of those. :)

But do note that instead of this:

    
    
        git checkout -t origin/feature
    

You can do this:

    
    
        git checkout feature
    

It'll find a branch named "feature" in one of your remotes and make a local
branch that tracks it.

------
fragmede
The article uses, but does not describe pbcopy and pbpaste on os x. Feed data
to pbcopy, and it goes to the clipboard:

    
    
      pwd | pbcopy # Copies the working directory to the clipboard
    

pbpaste outputs the clipboard contents:

    
    
      cd `pbpaste` # cd to the directory in the clipboard
    

(I use this to go to the same dir in a second terminal) (There's Linux
equivalent called, xsel does the same.)

~~~
judofyr
For Rubyists who are using Mac, these are very handy in IRB:

    
    
        # stick in .irbrc
        def copy(str)
          IO.popen('pbcopy', 'w') { |f| f << str.to_s }
        end
    
        def paste
          `pbpaste`
        end
    
        def ep
          eval(paste)
        end

~~~
bretthoerner
I knew of pbcopy/pbpaste, but never thought of that. Great idea,

Python version (adjust to pbcopy/pbpaste if on OS X):
<http://gist.github.com/488852>

------
joblessjunkie
Good lord, the CSS on this page made me think I needed to get new glasses.

------
hartror
Would be nice if those that needed 1.7+ were marked so.

