0

Let me describe the scenario first and all of this needs to occur without connecting to the internet. A Windows method is preferred over Linux.

A client has a version of our software that was hand delivered by CD. After a certain number of pushes are made on our repository, I would like for the client to receive these updates to the files without having to redeliver all the files. I would like to only have to deliver a copy of the repository and have git update their older files to the current state. Access to history or branches is not necessary, only the most current version of each file is required to be copied.

So the question, What is the best (easiest) method to update separate offline files to a current external repository state?

I have read of a few possibilities but I do not understand the differences or capabilities of them or the exact process and commands. Furthermore, every example I have found uses https: to transfer the files.

1) remote add, remote update, then merge

2) clone repository then user would pull

3) git archive to create a tarball

4) bundle appears to be only for un-pushed commits.

It would be extremely helpful to have the cmd commands written out as well if possible.

lalitpatadiya
  • 720
  • 7
  • 21
Cash_Lion
  • 61
  • 1
  • 8

1 Answers1

0

If I understood your case properly then you can generate a patch file using git diff --patch <revision_of_customer> > latest_version.patch and then apply it on customer's side using patch utility. This approach will be working for text files only. If you have binary files in your repository you can take a look at utilities recommended here.

Community
  • 1
  • 1
Alexey Andrushkevich
  • 5,992
  • 2
  • 34
  • 49
  • Do patches apply to more than one commit? If there have been numerous pushes and merges how would you create a patch that encompasses all the commits? What if the is not known and you simply want to update their files to the most recent? – Cash_Lion Jun 04 '15 at 17:27
  • You may disregard the previous questions about multiple patch files. Reading about patches suggested this would occur, but your command did not do that. – Cash_Lion Jun 04 '15 at 17:34