简体   繁体   English

将tfvc迁移到git未提交的更改

[英]Migrate tfvc to git uncommitted changes

Hitting a real wall here. 在这里打实墙。 We recently moved from TFVC to Git. 我们最近从TFVC迁移到Git。 I had a ton of uncommitted changes (mainly RESX files for translation stuff that couldn't be committed to the TFS repository yet.). 我有很多未提交的更改(主要是尚未翻译的RESX文件,尚无法提交到TFS存储库。)。 We transformed the TFVC repository to a Git repository and called it develop. 我们将TFVC储存库转换为Git储存库,并称之为“开发”。 I then created a feature branch called feature/Translations. 然后,我创建了一个称为功能/翻译的功能分支。 I was using sourcetree at the time and checked out that branch. 当时我正在使用sourcetree,并签出了该分支。 I manually (found the whole directory in explorer) copied it, and then pasted it into my new Git repository. 我手动(在资源管理器中找到了整个目录)将其复制,然后将其粘贴到新的Git存储库中。 So now I have two branches locally and remotely, develop and feature/translation. 所以现在我在本地和远程都有两个分支,分别是开发和功能/翻译。 feature/translation shows everything is up to date as far as translations are concerned. 功能/翻译显示有关翻译的所有信息。 It is not up to date with develop. 它不是与时俱进的。 Since I'm working in a feature area, I want to continually pull the changes from the develop branch into it so that it's up to do date. 由于我在功能区域中工作,因此我想不断地将更改从dev分支中拉到其中,以便它是最新的。 The problem is, every time I check out the feature/translation branch and merge the develop into it, it removes all of the RESX files I have created. 问题是,每当我签出功能/翻译分支并将开发内容合并到其中时,它都会删除我创建的所有RESX文件。

How can I successfully merge these two? 如何成功合并这两个? I'm missing something pretty obvious here. 我在这里缺少明显的东西。

Basically I want to be in the feature/translation branch, have git look at the develop branch, and then pull everything that's different (minus the new files that have been created on feature/translation). 基本上,我想进入功能/翻译分支,让git查看develop分支,然后提取所有不同的内容(减去在功能/翻译上创建的新文件)。

Thanks for any help in advance. 感谢您的任何帮助。 This has been killing me! 这已经杀了我!

You're supposed to commit changes before you switch branches. 您应该在切换分支之前提交更改。 It's one of the cornerstones of Git, and one of the advantages: You can commit locally all you want without any worries, since you can always go back and squash the commits later before you push the changes upstream. 这是Git的基石之一,也是优点之一:您可以在本地提交所有所需的内容而无后顾之忧,因为您始终可以在以后将更改推送到上游之前回退并压缩提交。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM