git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Getting a list of last commit's files and piping them..

From
Christian Himpel <chressie@googlemail.com>
Date
Sep 28, 2009, 14:13 UTC
Message-ID
<20090928141312.GA4564@mrslave>
In-Reply-To
<4f302eef91c72cd4583e0aa4707ab4c0@ahmednuaman.com>
On Mon, Sep 28, 2009 at 02:02:52PM +0100, Ahmed Nuaman, Freelance Designer and Developer wrote:
> I use git for a local versioning system and was wondering if there was a
> way that I could write a bash script that would get the paths of the files
> from the latest commit and then pipe them to ftp or ssh for deployment.

For example, to scp a complete file list from branch `topic' to `user@server', you could use `rsync' and do something like:

git checkout topic && git ls-tree -r --name-only | rsync -a -e ssh --files-from=- user@server:/path/to/dest

Note, that this is completely untested.  Use at your own risk.

Regards, chressie

Previous: Johannes Schindelin
Message 3 of 3 in “Getting a list of last commit's files and piping them..”
  1. Ahmed Nuaman, Freelance Designer and DeveloperSep 28, 2009
  2. Johannes SchindelinSep 28, 2009
  3. Christian HimpelSep 28, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.