swsnu / wecfall2014

0 stars 0 forks source link

Good practice to manage branch for multiple components / refactoring? #28

Open elnn opened 9 years ago

elnn commented 9 years ago

My questions and thoughts about branch managing.

  1. Our project is consist of several components. Largely, the frontend and the backend. They use different languages and frameworks. What would be the best practice for version control? (1) Use separate repositories. However, many features/issues/... should affect both components at the same time (and more frequently at the early stage). (2) Use separate master branches. Our team selected this approach at the first iteration. However, when we had to write code for server-client communication, we had to make two new branches. (3) Use one master branch and manage in the sub-directories. I think it's the best choice.
  2. We should do a number of code refactoring in agile software development. How do you refactor your code? In my case, I make a new "refactor" branch. Allow this branch could be failed on tests during refactoring. After finish, squash commits with rebase, and merge into other working branches. I don't know I am doing the right thing. Is there smarter approach you have?
jsjason commented 9 years ago

About 1: Our project also has the similar problem, and we decided to manage the back-end part as a sub-directory in our master branch ((3) in your comments). However, our project doesn't have a lot of issues that regard both front-end and back-end, and I don't think there would be any problems if we put them in two different repositories. In fact, our back-end doesn't need to be on our front-end web server, and if this wasn't a class project that requires one and only one repository for each project, we would've put the back-end code in a separate repository ((1) in your comments).