V
V
Vadim2020-06-07 23:02:44
git
Vadim, 2020-06-07 23:02:44

How to resolve next merge conflict before Pull Request?

Hello everyone,

a typical situation is before sending branch feature-A234 to remote repo using (git push origin feature-A234) I do local merge like this:
git checkout feature-A234
git merge develop
---> I get the following merge conflict (in the figure )
5edd46113de86370826484.png

1. Question 1. How to resolve it in such a way that my code (develop) is under the code (HEAD --> Current change) - in this way (but not the mixed/stupid version that is obtained by clicking Accept Both Changes in VSCode)

To happened:

24: resource "aws_network_acl" "feature_acl" {
25:    ## this acl created by the other user  
26: }
27:
28: resource "aws_network_acl" "my_acl" {
29:    ## this acl created by vadim  
30: }

2. After resolving the conflict, what commands should I enter so that the Pull Request to Bitbucket passes without problems?

all the best,
Vadim

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vladimir, 2020-06-07
@Casufi

If you solve the conflict not through VSCode, but by executing commands in bash or zsh at the input, you get a file with marked conflicts, and then you can write any code in it and commit Remove
the lines with <<<<<<<< ====== === >>>>>>>>>>> and you will get what you wanted.
I recommend that you create a test repository with one small file and manage to resolve conflicts manually by executing commands in the console (bash or zsh)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question