Reputation: 197
I dont know whether this is possible, but would like to know if we can do this?
Our client is using GitHub, and we are using TFS.
We dont want to change any of our settings, and want to continue on the work. But would like to sync the projects from TFS to Github and from GItHub to TFS as batch process every 30 mins, or whenever the change is made.
Any help or any pointers for implementing the same would be of great help.
Thanks
Upvotes: 2
Views: 661
Reputation: 51073
Unfortunately, there is no this kind official tool or services. You have to manually do the sync. Such as setting up two remotes in a local Git repository, i.e
git remote add upstream https://github.com/foo/bar.git
git remote add origin https://tfsserver/DefaultCollection/_git/bar
And then simply do a git pull upstream master followed by a git push origin master assuming that master is the branch that you want to keep in sync.
With either version control system, you probably want to keep a branch in version control in your TFS repository to match what is in your upstream GitHub project so that you can easily see change coming in the one place and then handle your merges inside your local repository.
Source Link: Integrating Github code to TFS - auto check-in
Another workaround is with help of a special build in TFS, then calling git command during the build pipeline. Detail steps please refer this blog: Keep Git repository in sync between VSTS / TFS and Git You could also use the Git Tasks in marketplace.
Upvotes: 2