An Interest In:
Web News this Week
- March 20, 2024
- March 19, 2024
- March 18, 2024
- March 17, 2024
- March 16, 2024
- March 15, 2024
- March 14, 2024
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
Dev To
An online community for sharing and discovering great ideas, having debates, and making friendsMore About this Source Visit Dev To