Git commit branch identification after branch deletion

I'm moving from subversion to Git, and I'm trying to better understand how I manage branches.

Say there is a bug in my software that is recorded as issue 123 in my bug tracking system. I can create a new branch in git to fix an error called "issue123". I am fixing a few changes to fix the error and merge it back into the main development branch.

At that moment, it sounds like I should delete a branch. The commits associated with the fix will remain in the repository, a bit, since the 123 problem has been resolved. I no longer need a pointer to a branch.

So my question is: if I delete the branch after the merge, then somehow I will later find where I fixed the 123 problem? Or should my merge message be something like a “123 fix merge problem”?

+3
source share
4 answers

Once you merge the side branch of "bug123" into - let it say "Main", the merge itself will be a command called "Combine the response error 123". You do not need to call him. The merge approval will contain all the changes you made to fix the "bug123".

0
source

, , . , .

git merge --no-ff

, , . , - . , .

git merge --squash

git , .

git merge --commit

, , .

0

, , " " " ". , , , , . , . , . , .

- , , , - , - git merge --no-ff <feature branch>. , , :

* c117bff Make squash joint scaling uniform
* 9eb9ac2 Fix eyelid control limit
*   b50c967 Merge branch 'lipWeightImprovements'
|\  
| * 6f98ea7 Smooth cheek weighting
| * fdf3f91 Improve lip weights
|/  
*   4434223 Merge branch 'hair'
|\  
| * a3f3f89 Add hair controls for front half of head
| * 22a6bf4 Add joints for and weight front hair pieces
|/  
* c338c14 Move archived script into archive/scripted folder

- " " , ". -, . , . , , " ", " release" . , , , .

:

  • git log --all --decorate --graph --oneline ( ). 4 , , . la "list all", 4 . las lass "" "-" , , , , -10 -25, , . las, , lass - . lb - 'list branch' - , -all, , .
  • , . " ", , . , , , . Git , , . , , .

la/lb, :

git config --global alias.la 'log --oneline --graph --all --decorate'
git config --global alias.las 'log --oneline --graph --all --decorate -20'
git config --global alias.lass 'log --oneline --graph --all --decorate -8'
git config --global alias.lb 'log --oneline --graph --decorate'
git config --global alias.lbs 'log --oneline --graph --decorate -20'
git config --global alias.lbss 'log --oneline --graph --decorate -8'

( ~/.gitconfig). .

0

, , -:

$ git tag archive/branch branch
$ git branch -d branch

. git ?

, , .

, : , - , 123? - " 123 fix"?

, . msgstr " fix_123 master", fix_123 .

, , .., , .

And to answer your first question, if you checked a branch before deleting it, you can find the fixed problem using tags.

0
source

All Articles