New command: "repair"

8 views
Skip to first unread message

Nodir Turakulov

unread,
May 19, 2012, 1:20:25 PM5/19/12
to git...@googlegroups.com
When something wrong happens during TFS interaction, for example
network connection drops, TFS state may be left corrupted. For
example, some files may be left checked out, or HEAD may be on a
pending commit instead of the master branch.

When it happens, I try to restore the state in a "try..catch" block.
However, sometimes I accidently press Ctrl+C during restoring and it
is interrupted.

For such cases I've added "restore" command. It is as simple as:

$ git tf restore

In fact it does the following:
$ tf undo -recursive .
$ git checkout -f master

--

As usually, it is in the 'dev' branch

-Nodir
Reply all
Reply to author
Forward
0 new messages