sfu-natlang / lensingwikipedia

Lensing Wikipedia is an interface to visually browse through human history as represented in Wikipedia. This the source code that runs the website:
http://lensingwikipedia.cs.sfu.ca
Other
11 stars 4 forks source link

Git workflow for faster development #207

Closed avacariu closed 8 years ago

avacariu commented 8 years ago

I think this has been brought up before, but I've been thinking of creating a new workflow for this project to speed up development (since sometimes some features depend on others, and it'd be nice to have somewhere to merge them so development can continue without affecting the master branch).

My idea a somewhat simplified version of this: http://nvie.com/posts/a-successful-git-branching-model/ Since we don't really have releases, we can ignore the release branches.

So the workflow is the following (bold means mandatory naming style):

For consistency’s sake (since GitHub will always create merge commits for PRs), we must use git merge --no-ff. This also helps if we want to revert the site back to a previous version.

Don't merge develop/master into your branch before creating a PR. We don't need two merge commits for one merge. If there are going to be merge conflicts, rebase (which is why you don't want to push to this repo before your feature is done), or the maintainer of the branch you're merging into can fix it on the command line. Rebasing is always preferable (you get all the benefits of a merge + cleaner commit history).

If you've already pushed, but you want to rebase, delete the remote branch, rename your local branch, and then rebase.

What this workflow requires is someone to manage the master branch, and someone to manage the develop branch; otherwise if you have multiple people pushing to the same branch, you get all kinds of conflicts.

Thoughts?

avacariu commented 8 years ago

I'll assume this is alright, and create a CONTRIBUTING.md file documenting it.

anoopsarkar commented 8 years ago

Sounds good. Go ahead.

avacariu commented 8 years ago

This is now in the develop branch, so I'll close this commit.