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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:08:10+00:00 2026-06-11T19:08:10+00:00

I have three branches: master, task_one, and task_two. I want to pull all updates

  • 0

I have three branches: master, task_one, and task_two. I want to pull all updates made by other people, and apply these updates to all of my work.

What are the correct commands?

  • 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-11T19:08:11+00:00Added an answer on June 11, 2026 at 7:08 pm

    There is no good way to “just update everything” automatically, because of the potential for merge conflicts. Because this implies that there is no good way to simply “always be up-to-date”, the next question to answer is: why do you require the updates?

    If you require them for code review, then

    git remote update
    

    followed by

    git log refs/remotes/<remote-name>/<branch-name>
    

    will let you examine the commits which others have sent.

    If you want to integrate them with changes which you have made, (you mention rebasing), then you only need to get changes before actually doing work on the branch. So, once you have checked out the branch you want to work on (and assuming you are ready to integrate changes at the moment- don’t integrate for no reason! integrate when you’re ready to!)

    git pull --rebase <remote-name> <remote-branch-name>
    

    will fetch <branch-name> from <remote-name>, and then rebase against it. It is actually a shortcut for (and is identical to) running:

    git fetch <remote-name> <remote-branch-name> &&
    git rebase <remote-branch-name>
    

    You can also set the default upstream remote / branch for any given branch, which would allow you to simply type

    git pull --rebase
    

    in the future. This is useful for longer-running topics. To set the defaults, use:

    git branch --set-upstream <local-branch-name> <remote-name>/<remote-branch-name>
    

    In summary, that’s:

    • git checkout <branch>
    • git pull –rebase <remote-name> <remote-branch-name>

    for each branch you want to update, with the caveat that I would generally advise against simply going through every branch until you’re actually ready to do work on it.

    If “master” is being actively developed, “remote-master” is being actively developed (and should be rebased-to), while “task_one” and “task_two” are based on “master”, not directly based on “remote-master”, it might make sense to only ever pull –rebase from “master”, not any of the task branches, and to rebase those on top of master, instead. eg:

    • git checkout master
    • git pull –rebase <remote> master
    • git checkout <task-branch>
    • git rebase master

    Though really, git pull –rebase <remote> master, mixed with the occasional git rebase master, may very well “do the right thing”, depending on the complexity of your history. Don’t rely on it, but be aware of the possibility. Understand how “git patch-id” and “git rebase” interact, as well as how “git rebase” plays with merges before you base your workflow on that simplification, but depending on your workflow, that could save you a couple of steps.

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

Sidebar

Related Questions

I have three branches (let's call them master, testing, and feature). All three are
I have a repo with 3 branches: master, Stable, and dev. I made a
I have two branches one is called master the other is called dev I
I have three local and three remote branches and want to be on the
Here's the situation, I have three branches, master , fix#1 and fix#2 , where
I have these 2 branches on my remote GitHub repository: development master How do
I have a git repo which has a few branches - there's the master
Have three divs in a container that I want to float over a large
i have three lists with the same number of elements in each other, i
i have three java based web application app1,app2 and app3 at production. All 3

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.