Feature/Concept | TFVC | Git |
---|---|---|
Repository | Team Project Collection | Repository or Repo |
Branch | Branch | Branch |
Check-out | Check-out | Check-out |
Check-in | Check-in | Commit |
Changeset | Changeset | Commit |
History | Changeset history | Commit history |
Merge | Merge | Merge |
Conflict | Merge conflict | Merge conflict |
Lock | Exclusive lock | No lock (concurrent editing) |
Clone | Get latest version | Clone |
Pull | Get latest version | Pull |
Push | Check-in (with pending changes) | Push |
Pull Request | Shelve Set | Pull Request |
Remote | N/A | Remote |
Fetch | N/A | Fetch |
Commit ID | Changeset ID | Commit ID (SHA-1 hash) |
Tag | Label | Tag |
Repository URL | Repository URL | Repository URL |
Fork | N/A | Fork |
Stash | Shelve changes | Stash changes |
Feature | TFVC | Git |
---|---|---|
Type of Version Control | Centralized | Distributed |
Branching and Merging | More rigid, can be complex | Lightweight, more flexible |
Check-out/Check-in | Files checked out with lock | No lock required, concurrent work allowed |
History Tracking | Changesets | Commits |
File System | Exclusive file locking | No exclusive file locking |
Workflow Flexibility | Less flexible, more linear | Highly flexible, supports various workflows |
Collaboration | Less suitable for distributed teams | Excellent for distributed teams |
Performance with Large Binary Files | Handles large files better | Not as efficient with large files |
Learning Curve | Easier for centralized VC users | Steeper, especially for new users |
Offline Work | Requires server connection | Supports extensive offline work |
Repository Size | Handles large repositories well | Repository size can become an issue |
Branching Complexity | More complex | Simplified |
Merge Conflicts | Fewer automatic resolutions | Better support for resolving conflicts |
History Examination | Tracks changesets and work items | Granular tracking at the commit level |
Tooling Integration | Integrates well with Microsoft tools | Integrates with various tools |
Open Source Projects | Less common | Widely used |
Here are some common TFVC commands along with examples:
Command: tf get
Example: Get the latest version of all files in the workspace.
tf get
Command: tf checkout
Example: Check out a file for editing.
tf checkout myfile.cs
Command: tf checkin
Example: Check in a file with a comment.
tf checkin myfile.cs /comment:"Implemented new feature"
Command: tf undo
Example: Undo checkout of a file.
tf undo myfile.cs
Command: tf workspace
Example: Create a new workspace.
tf worksace /new MyWorkspace /server:http://tfvc-server:8080/tfs/DefaultCollection
Command: tf workspaces
Example: List all workspaces on the server.
tf workspaces /server:http://tfvc-server:8080/tfs/DefaultCollection
Command: tf workfold
Example: Map a local directory to a server folder in a workspace.
tf workfold /map "$/Project" C:\Workspace\Project /server:http://tfvc-server:8080/tfs/DefaultCollection
Command: tf history
Example: View history of a file.
tf history myfile.cs
Command: tf changeset
Example: View details of a specific changeset.
tf changeset 1234
Command: tf get
Example: Get a specific version of a file.
tf get myfile.cs /version:C1234
Command: tf branch
Example: Create a branch from a source folder to a target folder.
tf branch $/Project/Main $/Project/FeatureBranch /comment:"Created feature branch for new feature"
Command: tf merge
Example: Merge changes from one branch to another.
tf merge $/Project/FeatureBranch $/Project/Main /recursive /version:T /comment:"Merged feature branch into main"
Command: tf resolve
Example: Resolve merge conflicts in a file.
tf resolve myfile.cs /auto:KeepYours
Command: tf get
Example: Get the latest version of files in a specific folder.
tf get $/Project/Subfolder
Command: tf label
Example: Label a set of files.
tf label MyLabel $/Project/Subfolder /comment:"Labeling files for release"
Command: tf status
Example: View pending changes in the workspace.
tf status
These commands should give you a good starting point for using TFVC in Azure DevOps. Make sure to replace placeholders like myfile.cs and $\Project with your actual file and project names.