Alex Wilson
Alex Wilson

Reputation: 1

Migrate tfvc to git uncommitted changes

Hitting a real wall here. We recently moved from TFVC to Git. I had a ton of uncommitted changes (mainly RESX files for translation stuff that couldn't be committed to the TFS repository yet.). We transformed the TFVC repository to a Git repository and called it develop. I then created a feature branch called feature/Translations. I was using sourcetree at the time and checked out that branch. I manually (found the whole directory in explorer) copied it, and then pasted it into my new Git repository. 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. 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.

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).

Thanks for any help in advance. This has been killing me!

Upvotes: 0

Views: 102

Answers (1)

Daniel Mann
Daniel Mann

Reputation: 59016

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.

Upvotes: 1

Related Questions