Skip to content

Instantly share code, notes, and snippets.

View piyushs02's full-sized avatar
😊
On Work

Piyush Srivastava piyushs02

😊
On Work
  • Stanza Living
  • New Delhi, Delhi, India
View GitHub Profile
@miss-invincible
miss-invincible / git1.md
Last active February 27, 2017 15:48
when u commit and then realize that yo have not pulled from remote.Follow these steps to avoid adding an extra merge commit to your branch and keep the commits clean.

Say the branch in which you were working was : master

git add -A
git commit -m "added few changes"
commit hash = 5e108f2

you added your work and then committed it. But then realised you forgot to pull.Now:
git checkout -b newtry master
// git checkout newtry -->optional : try without this