Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Upload changes to a remote FTP directory with a Post-Commit Git hook Python app

NotificationsYou must be signed in to change notification settings

funprogrammer89/Git-FTP-Py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Script to update ftp files based on Git commits.

Dependencies:Python's Pip package installer&GitPython ('sudo pip3 install GitPython')

Only tested working with Linux. Have not tested FTP SSL.

A Python script that uploads/removes changed files according to Git commits. Add 'post-commit' file in your git repo at '.git/hooks' and update the path inside the 'post-commit' file to point to the GitFTP.py file. You do not want to place the GitFTP.py file inside your repo directory because it contains your FTP credentials. You do not want the GitFTP file being uploaded to your FTP. Make sure the 'post-commit' file is executable by using 'chmod +x post-commit'. Update the FTP credentials in gitFTP.py.

Now execute git commits to have the files automatically updated in your remote FTP.

Works with spaces in file names!

Known issues:

Not a big deal, but if you remove all files from a folder on a remote FTP directory, the folder will remain. Working on a fix. 2-26-23

About

Upload changes to a remote FTP directory with a Post-Commit Git hook Python app

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp