I got a problem while using xcode 4.6 to commit source code to the TFS, i'm using git-tf
but i can't commit source to server. I have been cloned folder from server. Please help me.
Once you have cloned your code on TFS to local git repo you are ready to make changes. Once you do them use:
git commit -a -m "commnent"
Now you can check them in your TFS:
git tf checkin
All commits will be checked as one single changeset on TFS.
Related
we have an local DevOps Server 2019 with our old projects and I am able to clone this projects with git-tfs to local Git repositories. Everything is fine. After that I can push this repositories to our AzureDevOps Git repositories. Everything ok.
Now we have some projects and colleagues who want to use TFVC for these special projects. So my idea was to clone these projects from local TFS to Git and then use git-tfs rcheckin to push it to our AzureDevOps project.
But when I use "git-fts rcheckin --remote azuretfs" I get "error: latest TFS commit should be parent of commits being checked in"
When I use "git-tfs checin --remote azuretfs" all files are uploaded to the AzureDevOps project but without the history.
So can anyone describe what I have to do?
Note: I don't want to use the MigrationTool offered by Microsoft because of to many erros during validation the templates of work items etc. (we dont use it...)
For those who are looking for the same:
With the 'old' git tf tool (https://archive.codeplex.com/?p=gittf) you can migrate old TFVC project to Azure DevOps(TVFC).
If you want to migrate old TFVC projects to AzureDevOps(GIT) you should use git tfs (http://git-tfs.com/)
What you could try without guarantee of success...
Note: As I said, you will be able to migrate the history from one branch only.
Create the folder/project in TFVC where you want to put the source code.
Migrate this folder with git tfs clone (to have a git commit with the git-tfs metadata required to rcheckin)
Add the already migrated history repo (let's call it RepoWithHistory) as a local remote in this new repository (let's call it NewRepo). And git fetch
Clean metadata for only the commit coming from RepoWithHistory with something looking like: git filter-branch -f --msg-filter "sed 's/^git-tfs-id:.*$//g'" -- --all. But be careful to keep the metadata on the commits coming from NewRepo.
Use git replace --graft <sha1_of_first_commit_of_RepoWithHistory> <sha1_of_last_commit_of_NewRepo> to graft the 2 histories (the history must be on top of the one from the new one)
Use git rcheckin --no-merge to migrate the history to TFVC (that will be long...)
I hope it will help.
PS: perhaps you should try to do it on a small subset of commits to be able to verify it will works before doing it in the real TFVC project.
I need to download entire project from TFS including changesets and need to add to another TFS server with all changeset details.
Is this possible in TFS?
Please help.
I made this done using git-tf and Powershell
I installed git-tf using the following link
https://chriskirby.net/blog/migrate-an-existing-project-from-tfs-to-github-with-changeset-history-intact
I cloned my existing TFS repo to Git,by using
git-tf clone https://myaccount.visualstudio.com/DefaultCollection
$/MyBigProject/MyMainBranch --deep
Inside the GIt folder there is a subfolder named .git,inside we can find a file git-tf.
Inside the file rename changeset to TFS.
To checkin GIT to TFS, configure the TFS folder where you need to copy the GIT. Folder must be empty.
change directorty to the GIT folder in powershell.
git-tf configure http://xxxxxxx:8080/tfs/DefaultCollection/
$/xxxxx/xxxx --force
git-tf checkin --deep --autosquash
Note:
Commit time will be the current time and for all changesets and author will be the person doing the operation.
To keep the author you can try
git-tf checkin --deep --autosquash --keep-author
I am trying to migrate Source code from TFS to VSTS. I tried git-tf command to migrate and was able to migrate successfully but i am not able to migrate the history. Can someone guide me on what i am doing wrong. Please note i am not migrating to GITVC but migrating to TFVC in Visual studio from On premise TFS server.
Steps are ...
git-tf clone http://onprimisetfsurl/ $/project project
git-tf clone http://Visualstudiotfvcurl/ $project project1
git pull project1 into project
git-tf checkin --deep
Look at OpsHub https://visualstudiogallery.msdn.microsoft.com/28a90a17-d00c-4660-b7ae-42d58315ccf2 since that is the one that was recommended by the VSTS manager https://blogs.msdn.microsoft.com/bharry/2014/05/14/migrating-on-premises-tfs-to-vs-online/
https://www.visualstudio.com/en-us/articles/adopting-vsts also covers other tools if that doesn't work for you.
Add "--deep" when you perform git-tf clone:
git-tf clone http://onprimisetfsurl/ $/project --deep
Add my steps for your reference:
git-tf clone http://tfsurl $/tfsproject --deep
Create a project "vstsproject" in VSTS.
Delete the "BuildProcessTemplates" folder in the vstsproject from web portal.
Create a new folder for vstsproject on local machine.
Run "git init" to set this folder to a git repository.
Pull the changes in tfsproject into the new created repo.
Run "git log" to make sure the history is correct.
git-tf configure https://vstsurl $/vstsproject --deep
git-tf checkin --deep
I'm a little bit confused with Xcode 5 Source Control options. I recently downloaded a project from Internet. That project had an svn repository associated and now I want to commit this project to one git repository hosted at bitbucket.
The problem is that I'm not able to see where is the option or what do I have to do to delete the association between the svn repository and the project. In the same way, I don't see where can I associate my bitbucket repository with the project.
I will answer myself. First of all I deleted the .svn folder inside my project, after that I opened a terminal, I went to my project folder and I entered:
git init
git add .
git commit -m "first commit"
After these steps I was able to upload the project to one bitbucket repo =)
I want to use TFS as a version control for developing one of our iPad applications. I followed this article for configuring my Xcode project.
After doing all the steps mentioned in the blog i am able to checkin and checkout the whole project. But I am not able to push changed files back to TFS server. More over I am getting following error on executing git push command
fatal:
https://username#mydomain:8080/tfsprod/info/refs?service=git-receive-pack
not found: did you run git update-server-info on the server?
Any Help would be much appreciated.
Just moving the comments into an answer.
You can't use git push. You need to use either git tf checkin or git tf checkin --deep (if you want a check in per git commit).
Reference documentation for git tf checkin is here