Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7170049
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:07:58+00:00 2026-05-28T15:07:58+00:00

Here, we are migrating our source code to github, and this transaction is giving

  • 0

Here, we are migrating our source code to github, and this transaction is giving me headaches 🙂
what I did: I gone to our workspace (is an eclipse project), and did git init and git add . and then git commit -am "first commit"
everything worked fine, and then, i just pushed it to github. success too.
but there is a big problem: My friend just made a change on a file named A.java and I just changed B.java. ok, not a big deal. then, he pushed it to github. whei I try to push, my push is rejected. Ok, I did a git pull github master and then, push again, and now, my ‘commit message’ turns like Merge branch 'master' of github.com:germantech/projectName
Ok, what am I doing wrong?
ps: sorry about my english

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T15:07:59+00:00Added an answer on May 28, 2026 at 3:07 pm

    You’re not doing anything wrong – when you do git pull github master, git goes to the repository indicated by the remote github, fetches everything needed for the master branch, and then merges it into your current branch. Before the pull, you had the following history:

    O --- A (master)
    

    … where O is the commit with the message “firts commit” and A is the commit that introduced your changes to A.java. Your friend, meanwhile, has the history:

    O --- B (master)
    

    … and that has been pushed to GitHub. When your git pull github master merges that into your history, it creates a “merge commit” to represent the state of the tree with the changes from both master branches:

    O --- B --- M (master)
     \         /
       ---A ---
    

    If, instead, you wanted to keep the history linear, you could do git pull --rebase github master, which would instead would “replay” your commits that aren’t in the remote version of the branch on top of that remove version of the branch:

    o --- B --- A' (master)
    

    Some people prefer that – I personally don’t care.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a plan of action at my job for migrating our source
I'm migrating some of our code from LINQ-to-SQL to Entity Framework. Previously, when run
I need to do migration date->timestamp with timezone similar to described here: Migrating Oracle
Here is my code, which takes two version identifiers in the form 1, 5,
Here's a coding problem for those that like this kind of thing. Let's see
We've got a weird problem while migrating our app from 1.3.7 to 2.0.0. Our
We will soon be migrating company data from our pre-production server to production with
In our application, we've implemented an automatic DB migration triggered from within our code.
I am migrating a project from NHibernate 1.2 to Nhibernate 2.1, and I have
Around here we have been working with a bunch of Visual Source Safe repositories

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.