Welcome to the Onshape forum! Ask questions and join in the discussions about everything Onshape.

First time visiting? Here are some places to start:
  1. Looking for a certain topic? Check out the categories filter or use Search (upper right).
  2. Need support? Ask a question to our Community Support category.
  3. Please submit support tickets for bugs but you can request improvements in the Product Feedback category.
  4. Be respectful, on topic and if you see a problem, Flag it.

If you would like to contact our Community Manager personally, feel free to send a private message or an email.

Is Merge to Main necessary?

John_McCormickJohn_McCormick Member Posts: 9
I have been testing some branching and merging in some recent parts.  I currently have a "document" that has changed radically since branching from "Main".  Is it required to merge the final design back into the "Main" branch or is it Okay to leave the final branch as-is?  If left without merging to "Main" how do others know which branch to reference?  

Can I successfully merge a totally different design back into the original "Main" branch without extensive errors?

Answers

  • alan_baljeualan_baljeu Member, User Group Leader Posts: 111 ✭✭
    There’s no assumption in Onshape that Main is the only true branch.  I think if you want to have something else be a good branch for people to work on it, give it a good name so people can identify that and use it.  

    As for merging back to main after a lot of changes, I suppose it depends what exactly you’re intending to do with Merge.  If you take your branch entirely and ignore other branches, there won’t be any errors.  If you depend on some object that another branch deleted, there will of course be errors.

    I hope this is right, I may be off on a detail or two of what merging implies.
    Creating knowledge-driven design automation software, for molds, etc.
    www.virtualmold.com

  • alan_baljeualan_baljeu Member, User Group Leader Posts: 111 ✭✭
    As a matter of process, the way to merge is to go Main to your current branch.  Then when it's confirmed good, merge back to main.  That way others don't have to worry about a broken main.
    Creating knowledge-driven design automation software, for molds, etc.
    www.virtualmold.com

  • romeograhamromeograham Member Posts: 656 PRO
    I have settled on a workflow where there's only 1 "active" branch - and that's Main.
    I use Branching to explore ideas, iterate for FEA, etc. However, once I've made final selections, I make sure to merge the correct branch into Main, make a Version in the extra branches at that point, and delete the branch workspaces. I'll often name the merged dead-end branch "FEA exploration - MERGED to Main" or something. I'll name the other dead-end versions with a useful name as well. You can always come back later and branch from those Versions to create more Workspaces if desired.

    Then, I try to make sure that Main is the only live workspace, and the only workspace that Releases come from (if you use Release Management).

    If you have several Workspaces (if each Branch has a live workspace) then every 3 weeks they all get updated - and it's no longer as easy to see which is the most recent or active Workspace (since during Onshape updates, they all get updated).

    Hope that helps!
  • John_McCormickJohn_McCormick Member Posts: 9
    @romeograham - That sounds like a solid process.  Logically, I guess I knew that something like this would be a solution.  I like your suggestion to rename the "dead-end" branches and deleting the "dead-end" workspaces to freeze the "dead-end" branch in time.  
Sign In or Register to comment.