Search code examples
gitgit-mergegit-pullgit-fetch

How to fetch and merge from URL into a project from zip file, using git?


I downloaded a big zip file from Github, months ago. I decided to change some parts of the project. I unzipped the file contents and made a mistake and executed these lines:

git init
git add .
git commit -a

git fetch https://github.com/Path_To_Project

This last line downloaded a big amount of data, which I thought it would auto merge it with my local files.

Now, I see that my local project is not updated. Still there are a huge amount of data in .git/objects folder. How can I merge those data into my project?


Solution

  • This last line downloaded a big amount of data, which I thought it would auto merge it with my local files.

    It would merge if you do a:

    git pull https://github.com/Path_To_Project
    

    Or, since you already fetched:

    git merge origin/master