FAQ: Git Teamwork - git merge

This community-built FAQ covers the “git merge” exercise from the lesson “Git Teamwork”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Web Development

Learn Git

FAQs on the exercise git merge

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

I am having trouble understanding the process of merging origin/master, specifically the text required to do this.

Does anyone have any information on this?

2 Likes

In the terminal just use: git merge origin/master

4 Likes

I did that but still having the same issue with the original poster,

1 Like

correct answer is:

step 1:
cd my-quizzes

step 2:
git fetch origin
git merge origin/master

step 3:
git log

24 Likes

git fetch origin

is not required in those steps.

1 Like

it is if you reload the page

The course should be updated to include this information. A simple note stating that if you see:

merge: origin/master - not something we can merge

you will need to issue the command:
git fetch origin

4 Likes

i cannot find the right steps to proceed, i’ve tried the steps told in this page but none of those seems to be the right ones. Pls help

I also had to use the git fetch origin command first. Says nothing about it on my screen / instructions.

thanks brother, you are a genius!

git merge origin/master

Yeah very correct. Just need to reset then type
git fetch origin
git merge origin/master

I followed the same steps but still getting below error

fatal: ‘/home/ccuser/workspace/curriculum-a/science-quizzes’ does not appear to be a git repository
fatal: Could not read from remote repository.

Not able to move forward…
Can somebody help?

i keep getting the same errors here and in the projekt as well were i have to use git fetch

Did you or someone else figure it out?

hi
Attaching my solution

$ git fetch
fatal: Not a git repository (or any of the parent directories): .git
$ pwd
/home/ccuser/workspace/curriculum-a
$ ls
ex5_check2.rb my-quizzes science-quizzes
$ cd my-quizzes
$ pwd
/home/ccuser/workspace/curriculum-a/my-quizzes
$ git fetch
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 1), reused 0 (delta 0)
Unpacking objects: 100% (5/5), done.
From /home/ccuser/workspace/curriculum-a/science-quizzes

  • [new branch] master → origin/master
    $ git fetch origin
    $ git merge origin/master
2 Likes

I had to use

git fetch origin

before merging was successful. Thank you!!

thanks man, yours is the only way it works

Thanks micro,
it worked well

What does it mean when it’s written “Print the commit history”. and how do I do it? Thanks in advance