3 ms·
I'm confused. How is that different from 'git status'?
by TekMol 8y ago
I'm confused. How is that different from 'git status'?
- Matt3o12_ 8y agoWell, git status doesn’t show unpushed changes from other branches but when I deploy, I normally go into the deployment branch and run git status there. So the unpushed changes in other branches would be quite insignificant. But everyone’s workflow is different. The author maybe should have added a reason why he uses that instead of git status
- TekMol 8y agoOk, so that would be a difference. Showing all unpushed changes from all branches. Seems unusual that all branches are involved in deployment though. Isn't the typical workflow that only one branch get's deployed to the user facing machine?
- oleks 8y agoIt first performs a git status, then fetches changes from upstream, and checks if all local changes have been pushed upstream (using git cherry).
- TekMol 8y agoI'm curious what the workflow is here. My workflow looks like this: A feature branch is mature enough to get merged into master. So I merge it into master on the staging server. And then push it to the public server.
- oleks 8y agoYes, so this is useful where deployment is "manual" in the sense that it is not a mere git push. It is bad practice to have git data lying around among otherwise public files, so you have to either set up git hooks on the public server, or fine-tune your public server access rights. Both require (slightly) more work than simply not pushing the git data in the first place.
- codetrotter 8y ago> It is bad practice to have git data lying around among otherwise public files Usually I have source files in a “src” subdirectory and assets in an “assets” subdirectory and configure the web server to serve from these two subdirectories. So the git repo root is one level above anything served by the web server.
- TekMol 8y agohave git data lying around among otherwise public files There are almost no public files on a server these days. It's mostly backend code generating output by combining data from databases and templates. So since it's already all non public stuff, I don't see a problem having the .git folder there too.
- deleted 8y ago[deleted]