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

The Archive Base Latest Questions

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

I did something silly. I was in a hurry and needed my code on

  • 0

I did something silly. I was in a hurry and needed my code on my laptop, so I copied my entire development directory from my desktop to my laptop, using a USB drive.

Anyways the development directory contained a git project which has had several commits pushed by others since I last pulled. Problem is I have made changes to the code on my laptop and to make things worse, my desktop PC has had a drive failure. My laptop does not even have git (yet), and I cannot transfer the files to my PC and then merge with the new code.

Once I have git installed, what should I do?

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

    It’s not really a huge disaster at all since git is designed to handle this type of thing. You just have to keep in mind that effectively you’ve created just another repository. It’s hard to give concrete advice without more detail on what changes have been made, but through the judicious use of branching, cherry-picking commits etc, it should be a relatively painless process to resolve (although it may take time).

    Depending on your skill level with git, for instance if you’re relatively new, this could seem to be an insurmountable challenge. I recommend you do read up on how to perform cherry-picking, branching and merging, how to push to a remote repository (and also how to add additional remotes) etc, as you’ll probably need to do a fair bit of the above. You should be able to effectively treat each repository as a discrete entity and push and pull between them to get them in sync (although, really it seems like you only want to be pulling changes from one to form your main repo and get it up to date before pushing and pulling to other dev repo’s again).

    There are some great resources on the web that can be found with some quick googling.

    Without more information it’s difficult to say what could be involved.

    As a suggestion to get started, it’s probably going to be easiest if you put the two repositories together on the one machine (put them in separate directories, you don’t want to accidentally copy one over the other). Then on that same machine, in your “main” repository set up a remote pointing to the other repository you’d like to pull changes from, it’s probably best to then perform a ‘git fetch’ to get the remote branches and head to begin the merging process manually (rather than performing a pull and having everything merge automatically, which might not be something you want to happen). Once you’ve done that, you can then cherry-pick and/or merge at your leisure.

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

Sidebar

Related Questions

I did something silly I think. I changed my cell style to 'code' and
Somewhere I did something silly. I was deploying my Rails app via cloning the
In my application I needed something like a particle system so I did the
Ok so I just did something boneheaded. I'm setting up a subversion server for
I just did something dumb with my SVN repository, I accidentally imported a load
Let's say I had a program in C# that did something computationally expensive, like
I mistakenly did marker folding to my .vimrc: {{{8 #CS something.. }}}8 {{{9 #Math
Well,I am trying to do something similar what I did in Adobe Flex.Consuming a
Did you ever had a bug in your code, you could not resolve? I
I am using pawn script for something, and everything works great except for one

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.