How can we help you today? How can we help you today?

How to sync local source control folders on new laptop?

I recently had a drive crash on my laptop. I'm using a different machine for now, but discovered that after I re-linked to my dev DB (shared model), the objects I created are not correctly displayed in SSMS. In particular, new objects that I created but not yet checked in. I've looked for a document on how to sync my local folders to a shared model. I only have a few objects to sync, and could do it manually if I knew how. Are there any instructions available for this scenario?
krshort
0

Comments

7 comments

  • AlexYates
    What source control system are you using? Can I assume you were using a git repo on the local machine (and that local repo was lost)?

    Is there a remote repo involved somewhere? On a server somewhere or in the cloud perhaps?
    AlexYates
    0
  • krshort
    Thanks for your quick response. I am on TFS. The relink re-created my working and transient folders, but my new objects do not show as belonging to me. They exist on the shared model DB, of course, but I can't check them in to source control from the new laptop.
    krshort
    0
  • David Atkinson
    @krshort Does it matter that they aren't shown as belonging to you? Can't you select them anyway and check them in?
    David Atkinson
    0
  • krshort
    No. When I select 'commit changes', the objects in question do not show up on the list.
    krshort
    0
  • AlexYates
    You can use SQL Compare Pro to compare your database to a set of folders and to update them. You can set scripts folder as either the source or target.

    https://documentation.red-gate.com/display/SC12/Working+with+scripts+folders

    Are you using TFGit or TFVC? If you are using TFGit you can just use SQL Compare to update your local repo based on the DB version and commit/push. That should sort ouut your sync issues.

    If using TFVC I cannot remember off the top of my head where the Git checkout gets mapped to and whether this will work. David or one of the dev team can probably help.
    AlexYates
    0
  • AlexYates
    *Note, for my suggestion with Git it's probably simplest to commit/push with whatever git client you normally use. Whether that's Git Bash, SourceTree or something else.
    AlexYates
    0
  • krshort
    Unfortunately we have not migrated to GIT yet, it is a project slated for 2018 Q1. Let me review the doc you referenced and see if I can figure out how to get my folders in sync. Thanks again.
    krshort
    0

Add comment

Please sign in to leave a comment.