Read these before asking your busy senior colleague

Image for post
Image for post

1. Update commit message

Run this command to get into your predefined git editor with your previous commit message in focus that you can edit and then save again.

git commit --amend --no-verify

2. Update pushed commit message

To update a pushed commit you start rebasing from the commit before the commit you want change. This is tricky, although certainly possible.

git rebase -i [COMMIT_HASH]...pick my-commit-message > reword my-new-commit-message...git push --force

3. Browse entire commit history

Sometimes you want easily browse the entire git history in your code editor or IDE. Run one of the following commands for easily accomplishing this.

Using VSCode

git log | code -

Using Vim

git log | vim

4. Create new branch with your changes

You often might start out building on the master branch, but when it times to create a pr you need a separate branch. …

Image for post
Image for post
React.js logo and Illustrated yellow lightning by @albingroen

How to do optimistic updates in React using Redux

Are you building an app that needs to be snappy for its users? Then you should probably consider doing optimistic updates. This will greatly improve the customer experience and the overall feel of your app. It will also better mimic the experience you have on a native desktop app.

What are optimistic updates?

Optimistic updates are a way of updating data in your app. You generally want to have a local state inside of your app, and before making the HTTP request to update in the backend, you want to update the local state with the data you assume will be returned by the backend. …

Yet another tutorial on how and why to use Redux

Image for post
Image for post
Photograph by Alex Iby from Unsplash

I have been in charge of setting up a new frontend at work for a new project. …


Albin Groen

Hi! I’m Albin, a front-end developer from Sweden passionate about software development, design, and self-improvement.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store