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

  • Home
  • SEARCH
  • 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 8327563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:09:16+00:00 2026-06-09T01:09:16+00:00

My shop has a goofy setup where one person code reviews and pushes, while

  • 0

My shop has a goofy setup where one person code reviews and pushes, while everyone else pulls, makes changes locally, then sends changes to the one guy for review and then push.

We all keep two local branches, “main” and “work” (“main” is static and we work in “work”).

I need to know how execute the following steps:
1) Replace my “main” with the origin
2) Merge my changes from “work” into the newly updated “main”
3) Copy “main” back into “work”

The steps can be in any order, but I need to accomplish the basic idea of keeping up-to-date and working locally. I’ve been reading over the documentation, but I’m terrified to make a mistake. Any help is appreciated.

  • 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-09T01:09:18+00:00Added an answer on June 9, 2026 at 1:09 am

    First, you shouldn’t be terrified of making a mistake. Set up some test repositories and see how things work before you work with your production code.

    Replace my “main” with the origin

    Assuming that your local main branch matches a remote main branch, you should simply be able to:

    git checkout main
    git pull
    

    This will bring your local branch up-to-date with the remote branch.

    Merge my changes from “work” into the newly updated “main” and Copy “main” back into “work”

    You said earlier that you don’t make any changes to your “main” branch.

    Having imported remote changes into your local main branch, you would merge them into your work branch like this:

    git checkout work
    git merge main
    

    This is a pretty typical workflow: you would see something almost exactly like this if you were tracking code from an upstream source and maintaining a local set of patches.

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

Sidebar

Related Questions

A little setup: Our shop has a mixture of different platforms. Almost all of
Using Rails 3.2. I have an individual Shop post, and each shop has reviews.
We have a Zend application that has these following modules: Users Shop etc... Front
I have a table called Product and a table called Shop. Each shop has
So suppose my sandwich shop has two service interfaces, IMeatGetter and IVeggiesGetter. Now I
Merchant has_many Shops Shop belongs_to Merchant i.e. One merchant (Starbucks) can have many shops
The shop that I work at basically has developers creating controls and a backend
I'm doing a test web shop that has sections within sections. There can be
I work for a software shop, which has an in house predictive dialer product,
shops habtm products and vice-versa. user has many shops and shop belongs to user

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.