Answer the question
In order to leave comments, you need to log in
How to painlessly implement Git?
Good evening everyone!
I work on projects mostly by myself. Here I have to fight by hook or by crook :)
I decided to implement git in projects. It turns out here is such a working structure:
I.e. development is mainly on my work PC , automatic synchronization with Dev is configured. Host (to view the result of the code). As I did the feature, PUSH is done to the bitbacket repository . And then, after the approval of the edits, you can go to the Prod Host and make a PULL there .
At least I understood it should look something like this :)
At this stage, I work exclusively with Dev. Hostand from it handles everything is copied to Prod Host .
Ambush number one: I read in all sorts of smart Git work flows that many develop branches are created for features and changes and development is carried out exclusively in them, merges are periodically made. I don’t understand where these branches should be: only on my PC or in production too. B will have an advantage over the current data transport model. And is the Develop branch needed in production? I understand. why branches are needed, I don’t understand why they are shoved everywhere.
Ambush number two:My working project (folder) is in the dropbox, directly. And from the house, also directly from the dropbox folder, the project is launched. In phpstorm. Those. I worked in the office, came home and I finally don’t have to do anything, just run the IDE and that’s it. And often the IDE itself says let's re-render again, the files have changed there.
As I understand it, dropbox will have to be abandoned and PULL should also be done at home . Worked at home, did PUSH in bitbacket . And like this push-pull back and forth. Forgetting to do one or the other how to hello ;(
Any comments on thoughts like this? :)
Thank you.
Answer the question
In order to leave comments, you need to log in
1. Bitbucket should have a dev branch, a master branch, and release version tags. feature/hotfix branches as needed. Those. if a feature/fix stretches for more than one day, then in the evening before leaving home you push it to the repository. The next day, if you work from home, then download it from the repository. Also, if you do not come to work, then another developer will be able to continue your work by downloading a branch from the repository. Reading about branches.
2. Your scheme lacks a CI server, and therefore various crutches and questions about branches appear. When you commit to the dev branch (feature/hotfix is committed), the CI server automatically builds the project, runs the tests, and deploys your project to the dev server. When you commit to the master branch (a hotfix is committed or a branch release from dev is committed), it runs the tests and deploys your project to production.
One , two .
Git is a distributed version control system. And this means that:
does not need a centralized storage: the entire history of document changes is stored on each computer in the local storage, and, if necessary, individual fragments of the local storage history are synchronized with a similar storage on another computer.
I myself became interested in this topic :)
on dropbox, in my opinion it makes no sense to refuse it, the repository is essentially just files, no matter where they are. It will just be the same for you both at home and at work. And pull and push to do already on the beatbucket
"And do you need a Develop branch in production? I understand why you need branches"
And yet you don't fully understand why you need branches if you have a "develop" branch.
Usually it is done this way: there is a trunk - everything is clear with it. There is a task for a feature. We branch, we make a feature, we merge back into the trunk. And so each feature has its own branch. Bugs are corrected only in branches (sometimes a rebase will be required).
Deploy, however, does not come from the trunk. After all, the version of SNAPSHOT is in the trunk. And you can't deploy it for production. As it should: branch from the trunk, remove SNAPSHOT, run all tests (attention to the words FoxInSox: CI is needed), deploy from this branch.
Going back to development, you are again branching off the trunk for each feature or feature set.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question