Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I'm fairly new to Github (to versioning in general) and have some questions. I looked in a lot of FAQ's etc. about this topic, but I can't find clear answers to my (maybe unclear) questions.
(I formed my questions below, keep in mind that it is all about a PHP framework I use to create small websites.)
Q1: I'm working on 2 computers. I use GitHub for Mac on both machines, so I can work localhost (clone a rep) and let it update the changes online. If I change a clone on one computer, commit the changes, will it automatically update the clone on my other machine? How does it work?
Q2: So I have a repository of a PHP Framework. How do I point out, label,... a version as stable/beta/...? So that while I'm updating the latest version, I will always we able to download a stable version. Is there "such function" provided on GitHub?
Q3: I already created small websites with this PHP Framework. After a few weeks, I have some updates in my PHP Framework repo on GitHub. How can I check which files I need to update in these created websites?
I hope I'm clear with my questions, any help is highly appreciated!
Thanks in advance!
Q1: No. Commiting to a GIT repository means commiting to your local repository. To make your changes available to others (ot your other computer) you have to push them to the central repository (github in your case) and than pull it from the other locations.
Q2: Git supports tagging. This means you mark a revision with a label e.g. "1.0.0 beta" or whatever. You can use this label when you checkout elsewhere, so you can checkout the exact same revision "1.0.0 beta" as you marked it earlier. (See git tag --help for more information)
Q3: I would recommend always changing the whole Framework. This might be some kB more traffic, but you don't need to worry wich files should I change. When you want to upgrade to the framework "1.0.0 beta" as tagged earlier and you change all files, there is no risk that you forgot something.
Related
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed last year.
Improve this question
I am looking for a solution for code management in the company.
We have a lot of projects that we work on on a daily basis. And sometimes two developers are required to work on the same project simultaneously.
An optimal situation for us is that each developer will have his local environment. And when he updates his code, the changes will be updated by all developers automatically.
And so virtually all developers will have the constantly updated version.
The problem with GIT is that the upload/download has to be manual, so the developer may forget to download a version.
We work in a PC environment.
Please, inspire me :)
My employer had this same problem, and came to the conclusion that there is only one way to handle it:
Teach your developers to use git properly. Ideally, teach them some kind of system for branching and merging, such as git-flow or GitLab Flow.
Some git tools can help you by automatically querying the server every 10 minutes to see if someone else has pushed new commits and prompt you to download them. (I think VSCode has this feature, but I don't remember for sure. Personally, I use SmartGit which also has this feature.)
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 5 years ago.
Improve this question
I'm developing a website, and im doing it on its final destination domain, not on localhost, and its almost finished.
Now I've come to the point where I'm beginning to get worried about what I do when users start using the site and some problems occur, or maybe I want to add a features to the site.
Is there any best practices which will allow be to minimize risks ruinin website and customer UX during updates, how to do it correctly?
If your website is small and easy:
Create a development domain/subdomain
Code and test there
Record all database structure changes (do database changes on a db copy)
Record your actions you use to test your website
As soon as you are ready to release a new version there are two options:
Update db replica and switch domains
Turn main domain off, update code and db, turn on
If website is not that easy, there should be local development, testing, staging and production environments set up independendly. You dev, then you test what you did, then you copy and install your code on real data before pushing it live on production.
To track changes and easily deploy new version to each of environments there are many tools connected with version control systems like git
And there is a good answer on how to use dev-test-stage-production environments with git: git with development, staging and production branches
First of all you have to work on localhost, while developing any new feature, of fixing a bug.
I recommend you also to use GIT branches, so you can create a new branch to add feature of fix a bug.
After finish use GIT merge with your website master branch
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 7 years ago.
Improve this question
I'm fairly new to web development and I have only published one website before. With that website I only used some PHP and without framework. Now, I'm planning on using the laravel framework for my next, bigger, website. I'm wondering if there are differences between publishing a website when using a PHP framework? If so, what are the major differences and where can I read about it (googling has not helped me)?
You have countless options. Here are some I am aware of:
1. FTP'ing
Basically, you could just publish your site/app by FTP'ing it up to your server. The biggest issue will be the Database-changes. Here, the main influence is, whether are you able to run migrations or not? You would at least have to have ssh-access to your server with the required prerequisites installed. Otherwise, you would need to keep track of the changes in some other way, and change the db manually (which is not an good option IMO).
2. Automated deployments
There are server-deployment automation-tools, the one i know is capistrano. You can write scripts which do the deployment. These tools are also capable of running migrations, if you tell them to do so, but you would need to have ssh-access for that. Google will tell you the rest, here is a good tutorial.
2.1. Push-to-deploy
If you use SCM for your "bigger project" (which i would highly recommend), you could use push-to deploy technologies. This approarch basically uses Git-Hooks for triggering deployment-scripts. Deeployer could take care of that for you, if you do not want to develop your push-to-deploy-solution from scratch. Other alternatives are Rocketeer (Open Source) or DeployHQ (Paid)
2.2. Using laravel-taylored hosting/deployment/server-management services
Services like laravel-forge or envoyer offer zero-downtime automated deployments. I guess they are also based on push to deploy anyway. If you want to learn more about them, i recommend watching the corresponding laracasts-series (Forge, Envoyer). Be aware that they are not free.
I hope this overview gets you started. Happy deploying!
There is no difference between publishing a plain PHP website and one with a framework. Simple FTP up all your files and it will work, just remember to upload the framework files also.
Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm managing a team of 4 developers. We develop CMS based sites on a PHP / MySQL backend.
I want to improve the workflow. What i want:
Are there any services that host a git repo and sync it automatically with the servers?
Production server would be master branch
Testing server would be a different branch
we deal with many small sites and some large so we need workflow to be fast and agile
WHAT ABOUT THE DATABASE ? lol
(if anyone wants to add to the diagram PSD file can be found here: workflow.psd
I'd highly suggest using Beanstalk if you want something quick and easy to set up. It handles deployments very well. If you're looking at doing a bit more yourself (setting up the hooks and such) then another option would be github.
Please do not user Master as your production branch, master should never be production. A better workflow would be to have a Staging, Development, and Production branch / environment. Please see this guide about branching on Beanstalk's guides, it's pretty insightful.
As for keeping track of databases, if your framework / cms doesn't support database migration I'd highly suggest developing some form of migration / database version control in-house. You can also check out a framework like FuelPHP, which has migration built in. A nice little database version control system I found while poking around : dbv.php.
Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I wonder if Symfony 2.0 is stable enough to use?
Because I've never used Symfony before.
It seems that Symfony 2 is much better than the previous version and I don't want to relearn/recode everything some months from now.
When do you think it will be released?
Would it be a wise choice to use 2.0 now?
No.
Yes. http://symfony.com/download
http://symfony-reloaded.org/learn
Quote from above link:
Please note that Symfony 2 is not yet ready for production. The final release is planned for late 2010 and will only support PHP 5.3.2. In the meantime, we highly encourage you to use the current symfony 1.4 stable release for all your projects.
Symfony core team member here. No, Symfony2's not ready at all to be used in production, because it hasn't even reached the alpha state. As stated on the github page, things (especially the API) WILL change.
Furthermore, some components are not here yet, for example the Forms framework, so you would have to handle them by hand. Don't do that. But of course we'd be more than happy to get some feedback if you give it a try for a sandbox project of yours ;)
I would like to point out that we (www.exercise.com) are live and have been using Symfony 2 for a while now.
It has not been the most smooth experience (we try to stay up to date with the most recent sf2 branches on git, which is almost a full-time job for 1 person), but we have built a functioning site.
The largest hurdle right now to starting a project is the lack of documentation and examples online. So while it is possible to run a production site using Symfony 2, the framework still has a long ways to go until it can be used for a small project.
Yesterday at SymfonyLive 2011 (Twitter #sflive2011) Fabien said that the first Release Candidate will be March 2011.