Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GIT, When pushing code to production, should I create a branch or?

Tags:

git

I want to somehow tag the codebase when I push it to production, so that next time when I want to push to production I can do a diff and see exactly what files changed since the last time.

How can I do this with GIT?

Also, how can I list all production builds?

like image 283
Blankman Avatar asked Nov 15 '22 09:11

Blankman


1 Answers

1/ Remember than "pushing to production" is not always the ideal way to put your code in a production environement.

2/ You would have to use a Git hook on the "server" side (i.e. here the Git on the production side, like the the post-receive one to put a annotated tag on what you just received.
Those tags can be then fetch by the first repo, and used to git diff two of those tags.

like image 84
VonC Avatar answered May 21 '23 10:05

VonC