Deploy to Your Server Using Git

preview_player
Показать описание
Let's create a deployment pipeline using nothing else but Git. You'll learn how to deploy your application in "Heroku style" by using git push.

🎞 Timestamps
00:00 - What we're going to accomplish
00:48 - Requirements to follow along
01:09 - Create an empty git repository on the server
01:54 - Add a post-receive hook
05:02 - Make the hook file executable
05:24 - Add server to git remote
06:49 - Commit a change and push to deploy

👋🏼 Places I hang out
Рекомендации по теме
Комментарии
Автор

Nice work. This is exactly what I want.

bestyixuan
Автор

That's really easy and simple. Thank you so much man!

omarelrayes
Автор

Thank you so much. This is like magic for me.

riyalmasla
Автор

TAKE THIS LIKE, bro. Hours of my life spending on this problem are over

BagsySigel
Автор

This process is working for all the servers like 10n1, siteground etc.. or else only for aws and azure ?

vamsikrishna
Автор

When i'm pusing code. It's showing `You're on branch yet to be born` .... Although i can see in my terminal that it doest restart the pm2 server

CodeChit_hindi
Автор

What a hell?? It should be pain, why is so easy? :D Thank you ;)

alexlars
Автор

when i hit this "git push -u prod main"
i get this error
"Everything up-to-date
Branch 'main' set up to track remote branch 'main' from 'prod'."
Please help me

Автор

Хорошее видео, видел похожее от другого автора и это мне нравится гораздо больше! Хороший английский акцент

Voronoka
Автор

This is probably a silly question, but I have 2 main folders in my repo: client and server.

'server' needs to deploy to one server.
'client' to another.

Is there a way to do that? Or should I split them into separate repositories?

CharcoalDaddyBBQ
Автор

When doing this tutorial, everything works. But when I push changes to the remote repo, it returns 'Everything up-to-date' and displays the received commit on the server when I run 'git remote -v', but the changes do not appear in the project directory. I've tried this tutorial as well as many other similar ones and have received the same results, I have no idea what I'm doing wrong.

vividious
Автор

Question. On the remote server do you have two git repos? One for the bare and one for the actual project?

uimyzso
Автор

I've been using your technique for a while, much appreciated! I'm having some trouble with it on one site - I'm getting an 18 killed error on post-receive. Any advice is much appreciated as I'm not having luck searching on my own.

SkunkSCUL
Автор

I followed everything however when I run the first push I get remote: fatal: You are on a branch yet to be born and no files appear in the main project folder online.

TravisHayler
Автор

Can I know what font you use in terminal?

mnrsociety
Автор

how do you updated the git clone on the server?

SuperGari
Автор

Can you please h3lp me, I am getting an error saying
error: remote unpack failed: unable to create temporary object directory
! [remote rejected] main -> main (unpacker error)
error: failed to push some refs to

robotics
Автор

Thanks for your video, I am trying git remote add prod <serverName>@<server ip>:</path/remoteName>.git
I got this:
port 22: Connection refused
Would you tell me what I am wrong?

gunrunjk
Автор

I’m sorry I couldn’t finish watching it

keemkorn