T
T
Tolya Ivanov2014-09-21 12:53:18
git
Tolya Ivanov, 2014-09-21 12:53:18

How can a newbie work with git to maintain a single site?

Hi, I’ll tell you right away, I’m new to git and php in general, I know html, css very well and I can only edit other people’s work. I found a cms engine that I like for my blog, it is updated on github.com
As far as I understand the idea of ​​git is version control and maintaining its own version.
My idea is to download this cms and update it myself, once a month the engine code.
How can I do it in such a way that I edit my code (mainly I edit css, php text), but still be able to pull new versions from the main repository?
I'm on a Mac, I'm using the free SourceTree program, here's its interface:
bd1f4b61a5034cbb829ca9e4398ac1e2.png
I have questions about how to use it, what are these buttons, Fetch, Pull, Push, Branch, Merge, Tag - why do I need it?
I now want to start editing css, but how do I do it? I can’t figure something out, please poke your nose somewhere, don’t scold too much :)

Answer the question

In order to leave comments, you need to log in

4 answer(s)
M
ManWithBear, 2014-09-21
@ManWithBear

Learn to use git'om.
For starters, I advise an easy introductory course -> CLICK!
And then you can also read a book -> CLICK!

S
Sergey, 2014-09-21
Protko @Fesor

Submodules .

E
evnuh, 2014-09-21
@evnuh

Learn to use Google. Next, you simply have to spend half an hour and read git-scm.com/book/ru in full. After that, you will be able to answer all the questions yourself.
PS @Fesor's advice is dubious, tk. we don't know how your code works, but of course it's better that your code and the CMS code are in different folders and controlled by different repositories.

Y
YEASTOR, 2014-09-26
@YEASTOR

1. Read git-scm.com/book/ru
2. Set up 2 environments (1 - production, the one where the public site is located, 2 test - hosted or locally)
3. Create a git repository
4. Set up .gitignore so that files with cache, with logs, with database settings, with CMS code were not sent to the repository.
5. Create 2 branches dev and master, in master - only tested, working code.
6. After successful testing in the test environment, upload (manually or via IDE) files to the combat FTP, test, merge master with dev.
In paragraph 6 there is a difficulty, how to upload only the changed files to FTP?
You can set up git on the production server and pull from a remote repository (bitbucket.org)
You can use a smart IDE like PhpStorm, which itself uploads changes to ftp.
What engine are you using?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question