earlxtr
earlxtr

Reputation: 370

Github Repo is out of sync with my local project using VS2013

I am the only developer on this project but work on several different machines. I have a private GitHub account and commit all changes locally and then to this repo. This has worked perfectly for 6 months or so but now when I clone a repository some references are missing. It seems that the repo is out of sync with my local project and possibly with my local repo. (How do I know if my local repo is out of sync as well?) Anyway, I now need to make the remote GitHub repo match what I have in my local project. How do I do this? I have tried searching for a solution but could not find this exact scenario and do not want to have the opposite happen and accidentally sync the remote repo to my local project. I am using VS2013 and have done all commit and pull operations through this application. I am not really familiar with other git tools so if you suggest something that requires another tool, please let me know the tool you are using.

Thank you

Earl

Upvotes: 0

Views: 122

Answers (3)

earlxtr
earlxtr

Reputation: 370

It turns out that I was really on the wrong track here. I was working in VS2013 V5 on one machine and VS2013 V4 on the other. One of the Nuget packages was not compatible with V4 so it would break the nuget install and cause all the nuget references to be broken. Once I upgraded the all the clients to V5 everything worked. Thank you, Everyone for your help. I just took be a bit to figure out what was really going on.

Upvotes: 0

code_fodder
code_fodder

Reputation: 16411

I would guess that you have some branches that are not pushed or some such. You can check this by doing the following (in your local git, use your most up-to-date git, i.e. the one you did the most work early on):

git for-each-ref --format="%(refname:short) %(upstream:track)" refs/heads

Note: That line was borrowed from here - answer number 2

This will tell you if you are ahead of or behind on all of your branches. For each branch:

  • If it tells you that you are behind then you need to do a git pull <remote> <branch>.
  • If it tells you that you are ahead then you need to do a git push <remote> <branch>

Once your first local repo is up-to-date repeat this process on your other local clones.

Upvotes: 1

kk.
kk.

Reputation: 3955

If you want to synchronize your local repo with git then just use git push to sync your locally committed changes to remote repository.

Upvotes: 0

Related Questions