Announcement

Collapse
No announcement yet.

How to add history from a different repository into an existing project,

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to add history from a different repository into an existing project,


    Hi, being new to it (and bitbucket) I started of in a wrong way with setting op my project.
    I created 6 bare repositories on the bitbucket server
    - prod-batch
    - prod-macros
    - tst-batch
    - tst-macros
    - dev-batch
    - dev-macros

    Because of timelimes our developers started working on the dev repos directly (2 weeks ago), which were migrated from a now obsolete CVS (proprietory system). However studying up on git I found this not to be the best set up. I now want to change this to the following set up:
    a project repository with two sub folders, being batch and macros. Based on that make a test branch and based on the latter create a dev branch.

    As test and production did not have any changes i could simply commit tst-batch to the tst branch and test macros to the macros folder of the test branch. But now I want to do the like for the dev branch and add the dev-batch and dev- macros to the same, retaining the commit history. I am thinking git merge but i do not understand how to get this done correctly. What would be the best way to achieve the merge of the wrong repositories into the dev branch?

    regards Cees, sas developr, scrummaster and git newbie

  • #2
    Take a peek at this: https://saintgimp.org/2013/01/22/mer...-file-history/

    Comment


    • #3
      Thanks Doug, that is a very clear explanation. Would this however also work in our situation where we obviously have a few hunderd flies actually the same files with several being updated in the last weeks in the wrong setup. Will this lead to a large amounts of merge conflicts?

      e.g.

      in main test we have a file rpt_data_default_report.sas that has been twice modified in the dev-repo (in cvs terms, test has version 1.2 equal to production and in development we have progressed to version 1.3 goal is to have these three commits visible in the repo. Can this be done. Be aware I am a git newbie.

      regards, Cees

      Comment


      • #4
        In general, merge conflicts only occur if the same line(s) of a file are edited differently for 2 branches. You can actually edit the same file on 2 branches in different locations and not end up with a merge conflict. So if your folks are editing the same lines on different branches then, yes, when you bring them together there will be merge conflicts. Of course, that's ok if there's a human in the loop to choose how the conflict should be resolved (left, right, both, neither).

        In other words, the answer is a definitely yes - it's just a matter of how much manual work will be necessary in resolving any conflicts that arise.

        Comment

        Working...
        X