Your Web News in One Place

Help Webnuz

Referal links:

Sign up for GreenGeeks web hosting
June 19, 2022 12:49 pm GMT

Installing Git FTP

Here we will learn how to install git ftp to speedup our deployment. The advantage of the git ftp is we can maintain our project in efficient way. We can keep backup our code at git repository and we can find only the changed code and deploy the files to our server. When setup is done, we can upload files to our server with 2 lines of command.

How to Install Git FTP

First install git cmd here.

Now search gitbash in searchbar and Open GitBash and right click and select run as administrator.

First enter the below command to check which git file we need to install git-ftp

If the response is /bin/git.

cd C:\Program Files\Gitgit clone https://github.com/git-ftp/git-ftp git-ftp.gitcd git-ftp.git && chmod +x git-ftpcp C:\Program Files\Git\git-ftp.git\git-ftp C:\Program Files\Git\bin\git-ftp

If the response is /mingw64/bin/git.

cd C:\Program Files\Git\mingw64git clone https://github.com/git-ftp/git-ftp git-ftp.gitcd git-ftp.git && chmod +x git-ftpcp C:\Program Files\Git\mingw64\git-ftp.git\git-ftp C:\Program Files\Git\mingw64\bin\git-ftp

Now we will configure the git ftp.

Configure Git-ftp

Goto your project folder and run below these commands

git config git-ftp.url ftp://ftp_host/public_html/git config git-ftp.user ftp_usernamegit config git-ftp.password ftp_password

ftp_host is hostname like yourwebsite.com, ftp_username and ftp_password you can get these details from hosting provider cpanel, or any other web panel.

Pushing code to server using git ftp

Goto your project folder.

If pushing For first time use these commands.

git add .git commit -m "my changes description"git ftp initgit ftp push

If already pushed first time and uploading new changes use these commands.

git add .git commit -m "my changes description"git ftp push

Read also list of github commands for pushing and commit code.

Please like share and give positive feedback to motivate me to write more.

For more tutorials visit my website.

Thanks:)
Happy Coding:)


Original Link: https://dev.to/readymadecode/installing-git-ftp-4f2i

Share this article:    Share on Facebook
View Full Article

Dev To

An online community for sharing and discovering great ideas, having debates, and making friends

More About this Source Visit Dev To