Copy git-export.py to a folder:
$ cp git-export.py ~/Edit ~/.bashrc to add alias:
alias git-export='/home/xx/git-export.py'or to include PATH:
PATH=$PATH:/home/xxSetting sftp configs in git project:
$ cd git-project
$ git config gep.sftp.path '/var/www/'
$ git config gep.sftp.host '1.1.1.1'
$ git config gep.sftp.port 22
$ git config gep.sftp.username 'root'
$ git config gep.sftp.password 'xxxxxx'git-export has three options:
-r upload to server
-c choose staging area
-o path_of_folder export files to local folder
Just want to pack changes from new commit:
$ git-export
Patch file is: /tmp/xxx.tar.gzthen it will pack changes to /tmp/xxx.tar.gz
Just want to pack changes from staging area:
$ git-export -c
Patch file is: /tmp/xxx.tar.gzTo upload files added or modified in new commmit to server:
$ git-export -rBoth uploading new commit to server and exporting these files to local folder:
$ git-export -ro path_of_folderTo upload files added or modified in staging area to server:
$ git-export -crTo export modified files between two commits:
$ git-export -o path_of_folder 0df32f 430fdsTo export modified files from one commit:
$ git-export -o path_of_folder 0df32f