Skip to content

Instantly share code, notes, and snippets.

@acontreras89
acontreras89 / diff--ignore-all-space.md
Last active March 2, 2018 10:08
git diff --ignore-all-space flag

Result using git diff without arguments:

diff --git a/src/index.js b/src/index.js
index 56a41c3..c2b401b 100644
--- a/src/index.js
+++ b/src/index.js
@@ -3,6 +3,7 @@ import React from 'react'
 import ReactDOM from 'react-dom'
 import { Router, Route, Switch } from 'react-router-dom'
@acontreras89
acontreras89 / git-tips-and-tricks.md
Created April 11, 2017 13:45
Git tips and tricks

Git tips and tricks

If the branch we are working on has been updated before we push our work

We will get an error like this:

[rejected] master -> master (non-fast forward)
error: failed to push some refs to '[email protected]:me/me.git'
To prevent you from losing history, non-fast-forward updates were rejected