I have three zipped folders named [1,2,3] each contains the same project 1 being the earliest and 3 being the most current. I am looking for a way to merge all of these into 3 git commits and the 3 most commit be the folders contents.
I suppose I can do the following:
- Unzip 1.
- Take the contents from 1 place it into a new folder.
git initgit add -Agit commit -m "first commit- Unzip 2
- replace the contents from the new folder with contents from 2
git add -Agit commit -m "second commit- Unzip 2
- replace the contents from the new folder with contents from 3
git add -Agit commit -m "third commit
Could anyone tell me if this is the best way to do this?
Each time you run
git init, you’re creating an empty repository.If there are only three folders and you’re only doing it once, then this will work (if you omit
git init). Just make sure not to erase the.gitfolder.You could even unzip the three folders and move the
.gitfolder to each in succession and commit in each separate folder, with the final folder being the start of your new repository.