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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T21:04:59+00:00 2026-06-02T21:04:59+00:00

I have 2 branches in my git repository: capsule-os * remotes/m/ics capsule-os is branch

  • 0

I have 2 branches in my git repository:

  capsule-os
* remotes/m/ics

capsule-os is branch with my local changes to the remotes/m/ics branch. I work with (and build) the capsule-os branch, but remotes/m/ics updates sometimes, and I want to sync this changes with my local branch (in fact, add my changes to this remote branch). 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-06-02T21:05:00+00:00Added an answer on June 2, 2026 at 9:05 pm

    Amber’s answer is correct, but I thought it might be worth adding an answer with the alternative approach of rebasing rather than merging.

    If you haven’t published your capsule-os branch yet, you may want to “rebase” your changes on to the updated m/ics branch, e.g. with:

    # Make sure you're on the right branch:
    git checkout capsule-os
    
    # "Replay" all of your commits on top of m/ics, and update
    # capsule-os to point to the result:
    git rebase m/ics
    

    (You might have to resolve some conflicts then – if you can’t easily do that, you can put your capsule-os branch back to how it was originally with git rebase --abort.)

    As an alternative, you can fetch the new version of the ics branch and rebase onto that in one go with:

    git pull --rebase m ics
    

    There are lots of different ways of using git rebase, but they all essentially involve taking a set of commits and, for each of those, trying to reapply the changes the commit introduced onto some other commit. This is frequently used to “move” a set of commits onto an updated upstream branch, to keep the history simple.

    The reason that I qualified this with “if you haven’t published the capsule-os branch” is that rewriting the history of a branch can create difficulties for collaborators who are working on the original version of that branch. However, if it’s still private work, rebasing is a nice way to keep your branch up to date with upstream, and still keeping the history simple.

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

Sidebar

Related Questions

I have a remote tracking branch tracked locally in my local repository using 'git
I have a number of branches in a git repository: david@Panama ~/app: git branch
I have merged two branches in a local Git repository, with a bunch of
I have a git repository with master and alt branches. alt branch contains modified
I have local git repository on my pc with 2 branches, let's say branch1
I have some old branches in my git repository that are no longer under
I have a git repository (at github.com) with two branches: master and gh-pages. I
Suppose I have a git repository with several branches. I suspect some of the
I've read this book section about git branches. I have create a branch called
I have multiple but similar client-side iPhone apps, managed as branches in git (all

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.