I
I
idin2017-10-17 23:12:02
git
idin, 2017-10-17 23:12:02

How to organize work with GIT for one person?

The question is this.
I can’t figure out how to organize my work with git for myself alone in order to deepen my knowledge of git. That is, I tried commit, pull push, everything is cool, but I didn’t go further than that.
I write scripts, parsers, websites sometimes. And how can I puzzle myself so that I understand the full power of gita. It's just that the development history is stored in the ide, if you need to synchronize some scripts to work at home, the cloud is used. Well, I upload sites via FTP, and if somewhere I messed up in a file, that is, the history in ide (pycharm) rolls back where necessary and that's it. I guess my projects are not cool enough to use git to their full potential. But I think I just don't fully understand this system.
And another question, as I understand it, in order to work with git, there must be one project on the local, in which you develop, and on the server, but there is already a production version??

Answer the question

In order to leave comments, you need to log in

2 answer(s)
O
oh_shi, 2017-10-18
@Izy

1) create a repository on github and store the actual code there - get experience working with a remote repository
2) create your own branch for each individual project task - your list of commands will be replenished with merge / rebase / fetch / branch
3) try to fix jambs using git, you will figure it out with diffs, ways to roll back to previous versions, etc., and then decide how it is more convenient for you to do this through git or ide.
4) give up FTP and deal with a normal deployment tool, for example capistrano (by the way, it uploads the code via git)
5) start using aliases, even such simple `co = checkout` bring joy, what can we say about complex ones like `hist = log - -pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short`

E
ElijahTr, 2017-10-17
@ElijahTr

Create two accounts (it is possible from under one, but the probability of getting bumps :)
Create a repository (project) in one.
In another, make a fork (project_fork).
Do everything in the branches of your fork (project__fork--task01, etc.)
Make pull requests from the project__fork--task** branches in the project, then take the accepted changes from the project to yourself in the project__fork.
Make changes in the project, try to resolve conflicts the next time you try to pick up the changes from there.
Make some wrong commit of a bug, continue to work, after a while fix this bug with git commands, without affecting the changes made after it.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question