Comparing zip and git versions of the same codebase
For a consulting project, I was given two versions of the same codebase: one as a zip file, one as a git repository. I needed to determine:
- Were these exactly the same?
- If not, which was the newest version of the code and what were the changes?
Git was able to give me the best comparisons. I copied the .git
directory into the directory from the zip I got, and ran git diff
.
unzip source.zip
cp -R from_git/.git from_zip
cd from_zip
git diff
I was then able to see that the git version was newer than the zip version, its exact additions and deletions, and report back to my client.
Written by Dan Croak
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Git
Authors
khasinski
591.1K
dmichaelavila
500.4K
Related Tags
#git
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#