TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A few git tips you didn't know about

154 pointsby mtoddalmost 15 years ago

4 comments

dlsspyalmost 15 years ago
Inaccurate -- I wrote one of those. :)<p>But do note that instead of this:<p><pre><code> git checkout -t origin/feature </code></pre> You can do this:<p><pre><code> git checkout feature </code></pre> It'll find a branch named "feature" in one of your remotes and make a local branch that tracks it.
fragmedealmost 15 years ago
The article uses, but does not describe pbcopy and pbpaste on os x. Feed data to pbcopy, and it goes to the clipboard:<p><pre><code> pwd | pbcopy # Copies the working directory to the clipboard </code></pre> pbpaste outputs the clipboard contents:<p><pre><code> cd `pbpaste` # cd to the directory in the clipboard </code></pre> (I use this to go to the same dir in a second terminal) (There's Linux equivalent called, xsel does the same.)
评论 #1543915 未加载
评论 #1546169 未加载
joblessjunkiealmost 15 years ago
Good lord, the CSS on this page made me think I needed to get new glasses.
hartroralmost 15 years ago
Would be nice if those that needed 1.7+ were marked so.