1

So I have an older version of my project in my github repository and I want to overwrite it with the new version of the project. The issue is that I was uploading the files right into github and not pushing anything so it's not synced up with my current project. I don't want to pull from github cause the code has changed. I'm using visual studio and I want to commit and push from visual studio is there anything I can do like forcing the current project to overwrite the one on master?

A simple solution to this is to create a new repository and use that, but I'm new and wish to learn if there's a solution to this.

Peter Duniho
  • 68,759
  • 7
  • 102
  • 136
  • Personally, I've installed the standard Git tools (https://git-scm.com/downloads) in parallel with MSVS (and MSVS Teams), so that I can easily run my own Git commands as needed. In this case, you'd want `git pull --all` – FoggyDay Mar 14 '20 at 00:54
  • Does this answer your question? [Cannot push to GitHub - keeps saying need merge](https://stackoverflow.com/questions/10298291/cannot-push-to-github-keeps-saying-need-merge) – phd Mar 14 '20 at 04:41
  • https://stackoverflow.com/search?q=%5Bgit%5D+Updates+were+rejected+because+the+tip+of+your+current+branch+is+behind+its+remote+counterpart – phd Mar 14 '20 at 04:41
  • I solved the issue, part of the solution was the other post you linked to where I had to use 'git push --force' however it wasn't working so while I was snooping around VS I saw a property to enable forcing with git then the command worked. Thanks all! – Haig Karkar Mar 18 '20 at 21:06

0 Answers0