0
0

More than 1 year has passed since last update.

Team Foundation Server(TFS) で他人が編集中のファイルを元に戻す

Last updated at Posted at 2022-09-30

前書き

Team Foundation Server(TFS)上に休職中の社員がチェックアウトしたままのファイルが残っていたため、
チェックアウトを外す方法を調べて実行した。その覚書き。

本題

  • チェックアウト中のファイルを確認
コマンド
> tf status /collection:[検索対象コレクションへのURL] /user:[ユーザ名]

(例)
全ユーザについて確認する場合
> tf status /collection:https://hoge-server.net/tfs/hoge-collection /user:*

特定ユーザについて確認する場合
> tf status /collection:https://hoge-server.net/tfs/hoge-collection /user:hoge_user
  • チェックアウトされたファイルのワークスペース名を確認
コマンド
> tf workspaces /collection:[検索対象コレクションへのURL] /owner:[ユーザ名]

(例)
> tf workspaces /collection:https://hoge-server.net/tfs/hoge-collection /owner:hoge_user
  • チェックアウトされたファイルを元に戻す
コマンド
> tf undo /collection:[検索対象コレクションへのURL] /workspace:[ワークスペース名] [対象ファイルフルパス]

(例)
> tf undo /collection:https://hoge-server.net/tfs/hoge-collection /workspace:hoge_workspace $/hoge_folder/hoge_file.txt

よく分かるかもしれない解説

最終的に tf undo コマンドを実行したいので、それに必要な情報を tf status tf workspaces で確認しています。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0