Is there an opposite command to git archive for im

2019-04-10 05:32发布

问题:

Our local workflow tends to use a sequence of zip files as the local 'source control' before major revisions are formalised into the 'big' company SCM system. I'm trying to introduce git as a better local SCM method. The current workflow is quite effective for our small team, particularly as test machines are off net, as zip transfer is easy, so I need to be able to dovetail the two methods.

Is there a git command(s) that will import a project zip file and perhaps commit it?

Or is it a case of manually checking that the local working directory/branch is clean git status, remove all current content git rm *, unzip the zip file into the directory, add all git add ., and finally commit git commit -a -m "filename.zip". We are working on Windows, so minimising opportunities for mistakes is important, so the fewer commands the better!

This will at least allow reticent existing users to decide when to make the git switch, while still getting the repo up and running.

Any suggestions on suitable commands or scripts?

回答1:

Why dont you crate a git alias for unarchive which runs all the commands you mentioned in your question.