Articles → Git → Upload Files On FTP Server Using Git-Ftp

Upload Files On FTP Server Using Git-Ftp






What Is Git-Ftp?





Install Git-Ftp




  1. Install Git (http://gyansangrah.com/gyansangrah/article/install_git_ubuntu).
  2. Once git is installed, open git bash as an administrator.
  3. Go to the path where git is installed using the following command (Normally it gets installed in c:\program files\git)
  4. cd /c/"Program Files"/Git


  5. Use the following command to clone git-ftp
  6. git clone https://github.com/git-ftp/git-ftp git-ftp.git






  7. Use the following commands to complete the installation
  8. cd git-ftp.git && chmod +x git-ftp
    cp /c/"Program Files"/Git/git-ftp.git/git-ftp /c/"Program Files"/Git/bin/git-ftp



Configure Git-Ftp And FTP Server




  1. Go to the folder where you want to create the working directory.
  2. Initialize git repository using the following command
  3. git init


  4. Set the FTP credentials
  5. git config git-ftp.url ftp://ftp.yourdomain.com/whatever_path
    git config git-ftp.user <ftp_username>
    git config git-ftp.password <ftp_password>



Upload File On FTP Server




  1. Create a new file (or copy it from some other location) in the working directory
  2. Use add command to add the file in staging area
  3. git add .


  4. Commit the changes
  5. git commit –m “<message>”




git ftp init



Posted By  -  Karan Gupta
 
Posted On  -  Thursday, November 7, 2019

Query/Feedback


Your Email Id
 
Subject
 
Query/FeedbackCharacters remaining 250