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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T17:55:04+00:00 2026-05-10T17:55:04+00:00

I refactor my and other people’s code all the time . When I work

  • 0

I refactor my and other people’s code all the time. When I work in a branch and not in Trunk, this sometimes results in some extremely painful merges, especially if I don’t merge back to Trunk regularly (the code at the branch slowly shifts away from the Trunc, and when people modify Trunk I have to figure out manually how to apply this to the branch).

The solutions I know are either

  1. Constantly merge to and from Trunk – reduces painful merges, but then why work in a branch at all?
  2. Whenever you need to refactor something, switch to Trunk, do the refactoring there and merge to your branch – I don’t find this very practical, since the actual cost of switching environments for every refactoring is huge.

What do you 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. 2026-05-10T17:55:05+00:00Added an answer on May 10, 2026 at 5:55 pm

    Refactoring on a large scale needs to be done at the right time in the development timeline. If you do huge amounts of refactoring near release you’ll end up hurting yourself because you’ll introduce painful merges at a time when changes should be minimized. The more disruptive your refactoring will be the earlier in the development cycle it should happen (and the more special process there should be for it, e.g. stop edits to the affected files as much as possible for a period of time).

    Constantly merging to and from trunk is generally good practice.

    Why work in a branch at all in that case? Because you have more control (you can stop merging into trunk to stabilize it for release, for example, without stopping checkins to your development branch). Because you can place a high level of validation around merging to/from trunk without impacting checkin velocity to the development branch much.

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

Sidebar

Related Questions

How would I refactor this to get it to return a string not a
I'm about to refactor some duplicated code. Two functions both search in a multimap
Do you refactor your SQL first? Your architecture? or your code base? Do you
I often refactor code first by creating an inner class inside the class I'm
I want to refactor this mumbo jumbo of a method to make it more
How would you refactor this, keeping in mind that you have dozens more of
What is the best way to refactor the attached code to accommodate multiple email
Today I had a coworker suggest I refactor my code to use a label
I've been working a little with DevExpress CodeRush and Refactor! Pro this week, and
I have noticed that sometimes people have to use multiple versions of jQuery in

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.