DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports
Events Video Library
Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
View Events Video Library
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Integrating PostgreSQL Databases with ANF: Join this workshop to learn how to create a PostgreSQL server using Instaclustr’s managed service

Mobile Database Essentials: Assess data needs, storage requirements, and more when leveraging databases for cloud and edge applications.

Monitoring and Observability for LLMs: Datadog and Google Cloud discuss how to achieve optimal AI model performance.

Automated Testing: The latest on architecture, TDD, and the benefits of AI and low-code tools.

Related

  • GitOps: Flux vs Argo CD
  • Source Control /etc dot Config Files in *nix
  • [CSF] Enable Continuous Delivery of Your Resume With GitHub Actions
  • Adding a Selenium-Maven Project From Eclipse to GitHub Repository

Trending

  • Beyond the Prompt: Unmasking Prompt Injections in Large Language Models
  • The Emergence of Cloud-Native Integration Patterns in Modern Enterprises
  • 12 Agile Principles for Successful Agile Development Practices
  • A Better Web3 Experience: Account Abstraction From Flow (Part 1)
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Moving a TFS Git Repository to Github

Moving a TFS Git Repository to Github

Derik Whittaker user avatar by
Derik Whittaker
·
Apr. 10, 13 · Interview
Like (0)
Save
Tweet
Share
6.05K Views

Join the DZone community and get the full member experience.

Join For Free
We gave using the git support in TFS the old college try but the friction and issues were just too much so we decided to move our repository over to github.  I am not going to go over our issues w/ TFS git here, but I am thinking of creating a separate post for it.

Because we already had our repository w/ change history setup all we really wanted to do was ‘change remote origin’ for our repository and here are the steps WE took to accomplish this.

Our Steps (it is assume you already have a github account setup)

  1. Go to github.com and create your repository.

  2. Create a copy of your existing tfs/git source and move it to a new directly.  I do this simply to ensure I don’t screw anything up and have to do a new pull (i am lazy and xcopy is faster). 
    1. from c:\TFSRepo –> c:\GithubRepo

  3. Open a git command prompt and CD into the destination directory from step 1

  4. From the command prompt run ‘git remote –v’  this command is a sanity check to double check the current origin of your repository

  5. From the command prompt run ‘git remote rm origin’ this command will remove/clear the origin settings for your reporsitory

  6. From the command prompt run ‘git remote add origin http://github.com/[accountusername]/[reponame].git' this command will set the origin information to your new repository path in github.  Pay attention to the url’s casing as github is case sensitive and you may experience issues if the casing is off.  PS. You can get the url above from the github repository page

  7. From the command prompt run ‘git push origin master’ this command will push your current files up to github and publish them.  Please note that this will ONLY push the master branch.  If you want to push other branches you will need to do a ‘git push origin [branchnamehere]’ for each branch.

  8. Refresh the github.com project page and rejoice in the fact that you are out of TFS and your pain should be greatly reduced :)

These are the steps that worked for us, of course they may be different or better ways, but again these worked for us.

Till next time,

source control Repository (version control) GitHub Git

Published at DZone with permission of Derik Whittaker, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Related

  • GitOps: Flux vs Argo CD
  • Source Control /etc dot Config Files in *nix
  • [CSF] Enable Continuous Delivery of Your Resume With GitHub Actions
  • Adding a Selenium-Maven Project From Eclipse to GitHub Repository

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends: