nicolewhite / algebra.js

Build, display, and solve algebraic equations.
http://algebra.js.org
MIT License
1.34k stars 111 forks source link

Added Simplify to Summation #22

Closed dannbuckley closed 9 years ago

dannbuckley commented 9 years ago

Ignore the pull requests, those were just so my fork was up to date. I added the simplify code to the summation function.

nicolewhite commented 9 years ago

I'd rather not have all those merge commits, can you just make a clean fork? In the future you should rebase.

kevinbarabash commented 9 years ago

git rebase -i can help with this situation.

@LEGOAnimal22 in this specific situation we want to collapse 4 commits so you'd use git rebase -i HEAD~4. In the editor leave the first line as pick 7444085 ... and edit the rest of the lines to be squash 7c28b41 ..., squash d21d345 ... and squash 0e22fce. That should squash everything into a single commit. Once you're happy with the changes, do a git push origin master --force.

In the future though it's probably best to create a branch first for your changes. It makes rebasing of upstream diverges too much a lot easier.

dannbuckley commented 9 years ago

I believe that fixed the problem.

kevinbarabash commented 9 years ago

@LEGOAnimal22 I'm so sorry, I should've read @nicolewhite's message more carefully and looked at what those extra commits were. Your squashed commit now has changes from merges you did before the squashing. Look at the difference between the "Commits" tab and the "Files Changed" tabs. You should be able to rebase your master agains upstream master, but I think it's probably safer to move these changes to a feature branch. In this case I would delete this commit, merge from upstream, create a feature branch, add your changes to that branch and create a new pull request.