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 4624478
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T03:08:06+00:00 2026-05-22T03:08:06+00:00

I have to use different computers. I updated file A, B and other files

  • 0

I have to use different computers. I updated file A, B and other files in one and B, C and other files in another.

Updates in file B are different part of code. I have committed in both.
I pushed A and B to the github.

Questions:

  • Now what should I do in another?

  • Should I just pull? Or should I push first?

  • If I push, will file A be overwritten?

  • If I pull, will file C be overwritten?

  • What kind of process do I need to take?

  • What do I need to do with file B which has different version? Can I merge them?

  • 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-22T03:08:07+00:00Added an answer on May 22, 2026 at 3:08 am

    The usual scenario is that you do a pull before you push up your changes. But it might be the case that the current ancestor of your commits is the same since you pulled the last time (i.e. all the others haven’t pushed anything yet), which means no merge is required and you can just push your changes without needing to pull.

    Once someone else has pushed their changes in between, then you always have to pull their changes into yours (this is where git creates what is called a merge commit, which is a commit that hasn’t been created the usual way with git add, git commit etc). Now your repository is synched with the latest changes and you can safely push to sync the central repository with yours.

    In this case you have to pull first, which means that C will not be overwritten, since both repositories have the same version (remember, you only changed B on both repos).

    In the case of B, where you have two divergent versions that must be merged by git, there might be conflicts. But this is exactly what a pull is, it’s a fetch (to sync your repositories) and a merge between your local branch that is tracking the remote branch, e.g. master is merged with origin/master.

    And finally the same thing will happen to A, the changes made in the first repo to A will be a trivial merge into A in the other repository, since the modified A is modified from the same version (identical blobs) of A in the other repo.

    Hope this cleared some stuff up.

    Cheers!

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

Sidebar

Related Questions

I have two web applications in the same solution. They both use different membership/profile
I have some folder with different files. I want to use something like this:
I use 3 computers regularly and a fourth one ocassionaly. I have used Dropbox
Whenever I have a library that use across different websites/ applications I've always just
I have a project which exposes object model to use by different types of
Does MS have a sample enterprise application that demonstrates the use of different Enterprise
Scenario I have a windows forms application. I want to use two different WCF
I have now worked on two different teams that use the Agile/Scrum approach in
I have an array of different type objects and I use a BinaryWriter to
I have a copy of emacs that I use on a couple of different

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.