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

Switched branches and then switched back, doesn't find tables that were dropped

Hi Everyone, this is hopefully an easy question to answer but I can't seem to figure it out.  

I was working in Branch A which had a lot of tables/stored procedures in it.  Had to switch to another branch that didn't, so those tables/SP's were dropped.  Went back to Branch A but my source control still thinks I have those tables and SP's.  Even though they were dropped when I went to Branch B.  So how can I get those changes back?  

I'm using Source Control in SSMS and also Visual Studios 2022
Obelix
0

Comments

6 comments

  • DanC
    Hi @Obelix

    When you say Branch A has a lot of tables/stored procedures in it, do you mean you've got objects that have been committed on that branch?

    DanC
    0
  • Obelix
    Yes, there are objects on that branch that my computer seems to think I already have available.
    Obelix
    0
  • DanC
    Hi @Obelix

    Interesting, if you do a 'git status' on Branch A, what does it return?
    DanC
    0
  • Obelix
    Hi @DanC,
    I just see the changes I've made recently to the branch.  Not all the objects and their changes that I know were there previously.
    Obelix
    0
  • DanC
    Hi @Obelix

    Ah, did you stash them before switching branch or anything like that? if not then those changes will need to be made again sadly
    DanC
    0
  • Obelix
    Thanks @DanC for your help but we were able to figure it out.  

    The issue was the sql source wasn't updating my local db (wasn't finding missing changes to objects and missing objects).  

    Apparently I had my SSMS setup incorrectly the entire time i've been using it.  Was asked how it was working!  

    The issue was when I went to link the repository I had selected link to repository when I should have selected folder.  Once I made that change everything started working again.  

    Thanks again for your help though!
    Obelix
    0

Add comment

Please sign in to leave a comment.