0

I am using Visual Studio 2013. I have project A in github in repository B. A team mate of mine broke the code so I had to use an earlier version of the code. I was supposed to clone the repository. I didnt. I downloaded a zip version of it and and opened it in visual studio and added code. Now I want to commit/upload this project into into repository B but i do not know how to do that. I do not want to create a new repository because I would not have the history anymore.

Help thanks.

EDIT: I am using visual studio github so please do not give me command line suggestions.

RuiQi
  • 488
  • 2
  • 14
  • So currently your "origin" ain't the "repository B"? – Ruslan Garipov Jan 28 '16 at 04:46
  • Hello thanks ! I am very new to github so im not sure what origin means. I created a project A many months ago and I uploaded it into github under repository B. Now I downloaded an old version of project A and would like to upload it to the same repository B. I dont know how to do that. – RuiQi Jan 28 '16 at 04:56
  • Hi so i managed to do it. I just cloned the project from my original repository. Then i overwrite the that downloaded code with the latest code and committed. If there is a proper way to do it through visual studio please do let me know. – RuiQi Jan 28 '16 at 05:20
  • Please correct me if I misunderstood you: you have a project A that ain't bounded to a git repository B and that's why you cannot `push` it to a Git server. Now you want your local Git provider initialize a link "'project A' <-> 'repository B'", don't you? As I know VS' Git provider can't initialize local Git repository in an existing directory, where code already exists. It requires you to specify an empty directory. Therefore to bind your existing folder with project A inside to a remote repository B you have to use Git tools from command line. – Ruslan Garipov Jan 28 '16 at 05:31
  • [What is “origin” in Git?](http://stackoverflow.com/questions/9529497/what-is-origin-in-git) ;-) – Ruslan Garipov Jan 28 '16 at 05:35
  • And by the way it's safe to use Git cmd tools and VS tools together. For example, neither VS 2015 built-in Git provider, not GitHub for VS extension can add a new remote to the existing local repository. But once you have issued `git remote add ...` in command line, VS tools will show you ALL your remotes added to a local repository. – Ruslan Garipov Jan 28 '16 at 07:03

0 Answers0