Answer the question
In order to leave comments, you need to log in
How to use Git as a beginner?
I took several courses on Git, but still there is no clear understanding of how to work with it. So far, I just figured out how to add changes, commit, send to github, download from there, maybe I’ll figure out the branches along the way. And I don't know how to use Git in practice in layout. When and how often should you commit?
Answer the question
In order to leave comments, you need to log in
So the courses were not very good. Git is not designed for layout, frontend, or backend.
With a version control system, you can track changes to anything. And the main advantage (in my opinion) is the maintenance of a kind of history of work on the project and the ability to roll back to a certain part of it.
Plus, with team development, "questions:" who did this? ", Plus the ability to limit changes to certain branches (for example, to production).
I'm sure that Git has many more advantages, I named those known to me. I don't know what courses you took, but githowto was enough for me , I also started reading the book "Git for a professional programmer", but I had enough pages for 200 :)
when I first encountered the git, there was the same question of what to do with it at all.
For starters, I just committed any intelligible piece of work, into one branch in a row.
after a couple of fakups, when it was necessary to restore something, the understanding of what portions to commit immediately became better.
after a couple of moments when I did it, I did it, and then it turned out that everything needed to be rolled back, but in history I have everything mixed up with what needs to be left, I came to understand why branches are needed.
etc.
In general - apply as much as you can, over time you will understand more in practice. Otherwise, they will advise you here git-flow, pull requests to yourself, autoversioning, deployment through hooks, and other things you don’t need.
Git is not needed for a beginner coder. It is enough to familiarize yourself, because it is needed for teamwork. Gain experience, and then, if you work in a team, you will master, and there you can learn a couple of commands, the rest are rarely used.
The basic rules are as follows:
1. Before starting work, make a new branch, for the stage of work, let's say for a sprint of 2 weeks
2. There are tasks in the sprint, each completed task is a commit, the automatic closing of the task is solved by adding an identifier to the https://help commit. github.com/en/github/managing-your-wo...
3. study the commands amend, blame, status
4. In the git, create tasks on the project board, when they commit, they change the status in accordance with paragraph 2
5. Everything is documented and raises no questions.
PS This technique works not only in github, but also in other systems.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question