Tonight I introduced a new shopping cart implementation to Booko. This new cart code is in preparation for allowing Booko users to create lists of books and to enable people to save these lists in their user accounts (coming soon). The shopping cart will be one of these lists.
The new cart includes the ability to increase the number of any particular title without needing to visit that book’s page.
I wasn’t able to migrate existing carts across to the new system, but any book you’ve viewed recently will show up in the “Your Recently Viewed” section. Enjoy!
I’m working on adding a new feature to Booko, but I accidentally started working on the Git Master branch, which I like to keep sync’d with the production version of Booko. So after a few commits I want to be able to add some fixes to Booko, but I’ve polluted my master branch with untested, unfinished changes. What to do?
After reading up on Stack Overflow, I decided to fix things. What I want to do, is reset my master branch to the version in production, and take all the subsequent commits and create a new branch with them. Turns out, it’s easy.
1. Find the commit you want the master branch to be at. You can find the SHA-1 name with “git log”
2. Create a branch from that commit with: git checkout -b new_master <SHA-1 commit name> (hint: this will be the new master )
3. Rename your current master branch to the new name of the feature: git branch -m master branchname
4. Rename the new_master to master: git branch -m new_master master
And, job done. You’re no longer messing up your master.