K
K
Klein Maximus2016-12-23 16:06:28
git
Klein Maximus, 2016-12-23 16:06:28

How to copy only the files changed in the current commit?

Access to the server is only via FTP. Often you need to upload changes of 20-30 files that are located in different folders.
Is it possible to somehow get a copy of all the changed/added files (it is clear that this will not work with deleted files) in a specific commit of files (respectively, from those sorted into folders) with one command (or better through the GUI)?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2016-12-23
@kleinmaximus

git diff --name-only HEAD^..HEAD
will show the contents of the last commit.
using it, you can already simply get the desired archive.

git diff --name-only HEAD^..HEAD | zip changes.zip [email protected]
will create a changes.zip archive with files changed by the last commit.

V
Vladimir, 2016-12-23
@Casufi

https://github.com/git-ftp

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question