简体   繁体   中英

In Visual Studio, what steps I need to check in code retrospectively into TFS, after changes have been made

Working in VS 2019. I forgot to check in the original source into TFS before making changes. So now, I need to get the original source into TFS and the changes in. What are the steps?

Source code in TFS. Latest changes in TFS as history.

  • If you hadn't checked your local code in TFS.

You could simply manually restore your changed code to original source (also remember to back up changes) and then check in your files.

Finally add your changes to local, check in pending changes. Now everything get back on track.

  • If you already checked your code in TFS.

You could delete all files in local workspace and add your source code, now Visual Studio will auto detect the pending changes, you just need to check in changes.

At present, the latest changeset is your original source. You could not change the order of generated changeset. However, you could choose to Roll back changesets .

A changeset is a permanent part of the history of your version-controlled items and cannot be undone or removed . However, you can roll back the effects of one or more changesets.

Then your local should be original source + changes, keep working and moving forward.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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