Git merge conflicts; part 3- resolving conflicts

answer

cd /home/dq/chatbot
git merge feature/queen-bot
echo "print('I am the queen')" > bot.py
git add bot.py
git commit -m "Fixed conflicts"
git push origin master

When used, the mission does not complete. I have tried several varieties of clearing cache and restarting the mission, still does not resolve.
edit: link to mission 121/merge-conflicts/3/resolving-conflicts

Hi @westlundderek:

Please attach the mission link as per these guidelines so we know the particular mission you are referring to. Thanks!

1 Like

@westlundderek:

Please made sure you complete screen 1 and screen 2 before attempting this screen. I was able to complete the mission using the commands above.

Here is the full command list from Screen 1

/home/dq$ git clone /dataquest/user/git/chatbot
Cloning into 'chatbot'...
done.
/home/dq$ cd chatbot
/home/dq/chatbot$ git checkout -b feature/king-bot
Switched to a new branch 'feature/king-bot'
/home/dq/chatbot$ printf "\nprint('I am the king')" >> bot.py
/home/dq/chatbot$ git add .
/home/dq/chatbot$ git commit -m "Make more kinglike"
[feature/king-bot 127258f] Make more kinglike
 1 file changed, 2 insertions(+), 1 deletion(-)
/home/dq/chatbot$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
/home/dq/chatbot$ git checkout -b feature/queen-bot
Switched to a new branch 'feature/queen-bot'
/home/dq/chatbot$ printf "\nprint('I am the queen')" >> bot.py
/home/dq/chatbot$ git add .
/home/dq/chatbot$ git commit -m "Make more queenlike"
[feature/queen-bot 8029de2] Make more queenlike
 1 file changed, 2 insertions(+), 1 deletion(-)
/home/dq/chatbot$ git checkout master
Switched to branch 'master'
Your branch is up-to-date with 'origin/master'.
/home/dq/chatbot$ git merge feature/king-bot
Updating 7647584..127258f
Fast-forward
 bot.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
/home/dq/chatbot$ git merge feature/queen-bot
Auto-merging bot.py
CONFLICT (content): Merge conflict in bot.py
Automatic merge failed; fix conflicts and then commit the result.
/home/dq/chatbot$ git merge --abort
/home/dq/chatbot$ cd /home/dq/chatbot
/home/dq/chatbot$ git merge feature/queen-bot
Auto-merging bot.py
CONFLICT (content): Merge conflict in bot.py
Automatic merge failed; fix conflicts and then commit the result.
/home/dq/chatbot$ echo "print('I am the queen')" > bot.py
/home/dq/chatbot$ git add bot.py
/home/dq/chatbot$ git commit -m "Fixed conflicts"
[master ea937f8] Fixed conflicts
/home/dq/chatbot$ git push origin master
Counting objects: 11, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (9/9), 842 bytes | 0 bytes/s, done.
Total 9 (delta 2), reused 0 (delta 0)
To /dataquest/user/git/chatbot
   7647584..ea937f8  master -> master
/home/dq/chatbot$ 
1 Like

The solution turned out to be "you are required to enter ‘cd /home/dq/chatbot’ " despite already being in that directory.

Your directions significantly helped. Thanks.