![](https://masterlysolutions.com/wp-content/uploads/2023/11/Switching-Gears-from-TFS-to-GitHub_intro.jpg)
As .NET developers, the move from Team Foundation Server (TFS) to GitHub can seem daunting. And, this guide aims to make the transition easier by providing a detailed comparison of daily tasks in TFS and GitHub.
![](https://masterlysolutions.com/wp-content/uploads/2023/11/tabular_comparison_of_daily_tasks.jpg)
Table of Contents
Tabular Comparison of Daily Tasks
Key Tasks | TFS Approach | GitHub Approach |
---|---|---|
Checking in Code | Use the “Pending Changes” window in Visual Studio to review and check in changes. | Stage changes using git add. Commit changes with git commit. Push changes to a remote repository using git push. |
Checking out Code | Done automatically when a file is edited, or manually via “Source Control Explorer. | Switch between branches using git checkout. |
Creating Branches | Create branches via “Source Control Explorer” in Visual Studio. | Use the git branch to create a new branch and git checkout to switch to that branch. |
Merging Code | Perform merging via “Source Control Explorer” using the “Merge” option. | Use git merge to combine different branches. |
Releasing Code | Merge code into the Main branch and then create a release via TFS pipelines. | Merge code into the Main or Master branch. Create a new Release via GitHub’s web interface or tag the commit using git tag. |
Hotfixing | Create a hotfix branch from the Main branch, fix the issue, and merge it back. | Checkout to a hotfix branch, make the fix, commit it, merge it back, and delete the branch. |
Shelving Changes | Use the “Shelve” option in the “Pending Changes” window. | Use git stash to save changes that are not ready to be committed. |
Unshelving Changes | Use “Unshelve” in TFS to retrieve changes. | Use git stash apply to reapply previously stashed changes. |
Release Versioning | Release versions are managed in TFS using labels to mark specific points in the codebase. You can create a label in “Source Control Explorer” by right-clicking on the desired version of your code and selecting” Apply Label. | You can use tags to mark specific versions of your code. Use git tag -a v1.0 -m “Version 1.0” to tag the current commit as version 1.0. Then, you can use git push –tags to push the tags to the remote repository. |
![](https://masterlysolutions.com/wp-content/uploads/2023/11/github_glossary.jpg)
GitHub Glossary
- Repository (Repo): A directory where your projects live.
- Clone: A copy of a repository that resides on your computer.
- Fork: A personal copy of another user’s repository that exists on your GitHub account.
- Branch: A distinct set of code changes with a unique name.
- Commit: A snapshot of your changes.
- Pull Request (PR): Proposed changes to a repository.
- Merge: Combining code from different branches.
- Issue: A note on a repository about something that needs attention.
- Stash: Temporarily saves changes you have made to your working directory but don’t want to commit yet.
Conclusion
Switching from TFS to GitHub involves a learning curve, but the modern features and collaborative power of GitHub make the move worthwhile.
Also, this guide is your one-stop resource for the transition, and the included glossary ensures you’re well-equipped with GitHub terminology. Feel free to use and share this guide to aid in your migration journey.