O
O
Oversec2016-04-25 23:28:05
git
Oversec, 2016-04-25 23:28:05

How to properly organize development environment with git?

I am developing sites both on wordpress and on frameworks, while I work in tandem with SEO (SEO) and there was no great need for git. But then I decided to speed up the work and began to get acquainted with git.
After implementing it in a couple of projects, the question arose of how to make one project be in one repository and be able to organize a devlop environment there and send it to production directly to the server with pulls. I read about the branches but didn’t fully understand it, can you share your ideas and experience in this regard? :)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
samizdam, 2016-04-25
@Oversec

In order to use git in the context you want, I would recommend getting comfortable with the following concepts:
- origin - the central repository through which synchronization occurs
- master - by default this is the main, central branch
- .gitignore - a file in which you can specify files and directories that should not be tracked - for example, local configs, automatically generated artifacts, vendors, logs, and other runtime
Thus, you and your colleagues
1. set up a local dev environment
2. ignore configs, etc.
3. develop something locally, commit
4 push to origin
5. clone in production, set up configs
6. repeat p.p. 3-4 + pull in production
This is perhaps the simplest scheme - it implements what you asked about.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question