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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T21:55:19+00:00 2026-06-12T21:55:19+00:00

I had git cloned the MapBox-ios-sdk project. I’ve made a few ugly hack changes

  • 0

I had git cloned the MapBox-ios-sdk project. I’ve made a few ugly hack changes to the code that was not appropriate to contribute back. But MapBox-ios-sdk changed recently. If I want to merge their latest changes to my project while still maintaining my hack, what’s the best practice about doing that with Git? Should I have branched initially when I cloned? Or should I just modify in the master branch and just git pull from the official source and resolve conflict, and keep it at that for future sdk version as well?

  • 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-06-12T21:55:21+00:00Added an answer on June 12, 2026 at 9:55 pm

    I’m going to assume that your hack has been committed to your local master branch. You can move it to a branch by doing something like:

    git branch -m master myhack
    git branch myhack^ master
    

    This will give you a myhack branch with your one commit on it (adjust myhack^ if there is more than one commit), and a master branch that matches the original master from the project.

    At this point, you can pull new code into your local master branch without conflict. Then, switch to your myhack branch and merge the new master in:

    git checkout myhack
    git merge master
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I had one Git repository (A) which contains the development of a project until
I'm new to Git. Let's say Alice and Bob had been developing their project
I have a project hosted with git. I just recently had to reinstall ubuntu,
I'm pretty sure I saw somewhere in a popular Git project the branches had
it had a existing git checkout and had made some modifications, then i checked
I'm fairly new to Ruby on Rails / Git and had a few questions
Today I got our svn repository cloned into git. I had some uncommitted work
I have cloned a remote repository and made a few commits. I am trying
I have a project that I have been working on for a few days
I am verry new to git. I cloned a project on my local server

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.