Appropriate strategy for tags and fixes with git

I was wondering if the strategy I use for tags and hotfixing tags (which I use to deploy rails applications) is suitable with git.

For tags, I just mark the fixation of the main trunk.

If this happens, I have to fix the tag, I check the tag (e.g. 1.0), fix the problem, fix it and re-mark it (e.g. 1.0.1). Now, if I need to make another correction in the tag, I repeat the procedure using the tag of the first correction as the first check (for example, 1.0.1).

Now I have noted two things: 1. When I check 1.0.1, I get a warning that I'm not in a branch - I assume that everything is in order, but how appropriate is this as a strategy? 2. When I try to deploy 1.0.2, I get an error message from capistrano (a tool used to deploy rails applications) while updating code from a remote repository, saying that it cannot find the [commit of 1.0.2] object. I can fix this problem by checking the wizard and merge 1.0.2.

Of course, I always push tags to the repository.

Is there something wrong / ineffective / inappropriate, or is this an assignment strategy? I am completely new to git, and I could not find much information about the deployment strategies that are commonly used.

+3
2

1.0

 $ git checkout -b hotfix1.0

, , (1.0.1, 1.0.2,...) , .

HEAd , . , :

 $ git checkout -m hotfix1.0

, 1.0 : , , , .

+3

:

1.0, . version-1 .

1.0.1.

, , , 1.0.1.

+3

Source: https://habr.com/ru/post/1722913/


All Articles