Close
Glad You're Ready. Let's Get Started!

Let us know how we can contact you.

Thank you!

We'll respond shortly.

PIVOTAL LABS
Election Day Special!

Help:

We made a branch in git called “–track” by accident, and now we can’t get rid of it. git thinks it’s a command-line argument, even when it’s in quotes.

Here’s the command what did it:

$ git checkout -b --track origin/actual_branch_name
Branch --track set up to track remote branch refs/remotes/origin/actual_branch_name.
Switched to a new branch "--track"

Consensus: kill it through RubyMine or gitX. There is also a way through the command line:

$ git branch -d -- --track

…but make sure you get the dashes in all the right places.

Interesting:

  • reset after tail – sometimes, if your PS1 has colors (or square brackets, or … ?) you can lose your Terminal after tailing a file. To get it back, type reset, which should work even if you can’t see it echoing. You may need an extra return before it.

  • The Giants seem to have won! There’s a parade tomorrow, right in front of the office. If you’re coming for the tech talk, leave extra time as streets will be closed and they’re expecting a crowd.

Comments
  1. I get the terminal issue without fail when tailing development log, but not many other types of files. I think it must be improperly closed colors.

  2. Malc says:

    Using `–` is a good thing to know, and is applicable to any shell command, not just git. It means ‘nothing after this is an option’.

    I used to used it as part of my questionnaire for employing sys admins: ‘How would you delete a file called `-rf *` in your home directory?’

Post a Comment

Your Information (Name required. Email address will not be displayed with comment.)

* Copy This Password *

* Type Or Paste Password Here *