I had a git repository hosted on GitHub. I recently switched machines and copied the files manually to the new machine rather than doing git pull
, kind of forgot to do so. Now I made some changes and initiated a new git repository while adding the GitHub one as remote. I need to know how can I merge the two repositories i.e keep my commit history from the GitHub one and also keep my changes made to the new one? Thank you!
If there are not too many changes (just a single commit's worth), this is really easy:
git clone ssh://... newfolder
newfolder
newfolder
and push. At this point, your Github history is correct. Delete the old folder, name the new one whatever you'd like.