Skip to content

Instantly share code, notes, and snippets.

Squashing Git Commits

The easy and flexible way

This method avoids merge conflicts if you have periodically pulled master into your branch. It also gives you the opportunity to squash into more than 1 commit, or to re-arrange your code into completely different commits (e.g. if you ended up working on three different features but the commits were not consecutive).

Note: You cannot use this method if you intend to open a pull request to merge your feature branch. This method requires committing directly to master.

Switch to the master branch and make sure you are up to date:

@lolocoo
lolocoo / auth-hook.js
Created January 12, 2022 09:23 — forked from ulises-jeremias/auth-hook.js
Examples of hooks utils using axios, recoil.js, keycloak-js, @react-keycloak/web and more.
import { useCallback, useEffect, useState } from 'react';
import { useSetRecoilState } from 'recoil';
import { useKeycloak } from '@react-keycloak/web';
import { commonNotification } from './common';
/**
* Returns the auth info and some auth strategies.
*
*/
@lolocoo
lolocoo / 1- tools.md
Created April 3, 2018 02:27 — forked from othorizon/1- tools.md
在线工具 汇总
@lolocoo
lolocoo / 1- tools.md
Created April 3, 2018 02:27 — forked from othorizon/1- tools.md
在线工具 汇总
@lolocoo
lolocoo / introrx.md
Created January 19, 2018 07:12 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@lolocoo
lolocoo / introrx.md
Created January 19, 2018 07:12 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing