1

I am working on the following repo with another developer.

https://github.com/practicia1234/Practicia

my branch is devSam and his branch is devSubu. Whenever he makes a new commit and pushes his code, i would like to go to his branch, pull a local version on my computer, and work on that and then push the code to my branch.

Here are the git commands i follow:

  1. -git checkout devSubu
  2. git pull
  3. git checkout devSam
  4. git merge devSubu
  5. (//work on devSam)
  6. git push devSam

when i am on the step "git merge devSubu" above, i get the following message and the code has not merged at all

Already up-to-date.

However, i know that my branch is not merged with devSubu and my code looks like it would on my branch, not on devSubu branch.

What am i doing wrong?

Thanks!

Sam Rao
  • 4,361
  • 5
  • 19
  • 21

2 Answers2

1

First, quick tip, you don't have to maintain a local branch devSubu, which would forces you to checkout, pull, before getting back to your own branch.

Without leaving your branch, you can at any time do:

git fetch
git merge origin/devSubu

Second, if the merge reports "Already up-to-date" (as seen here), that means there is no new commits to merge into your branch.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

I'm try on the local, uses your steps. No problem! Check your steps:

  1. git checkout devSubu
  2. git pull
  3. git checkout devSam
  4. git merge devSubu
  5. git push devSam
Hiren Gohel
  • 4,942
  • 6
  • 29
  • 48
ixx
  • 1