Skip to content

Instantly share code, notes, and snippets.

Last active November 24, 2020 14:37
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
Notes about my usage of GIT

My GIT habits :

  • On Windows, through GIT bash

  • No UI, except occasional gitk --all& to visually check branches and commits

  • Use git fetch then git merge --ff-only origin/master

    • I don't like git pull auto-merging feature that messes up the history
  • Use git add -p to :

    • make a quick review of changes before commit
    • try to split changes, and add those which are related in a commit
  • When initializing a file, from a generated or copied content :

    • First commit the unmodified version
    • Then commit the changes, can help in the future to spot the differences
  • git commit often, in a local branch

  • git stash when needed

    • often only when conflicts prevents switching branch
  • git tag when delivering

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment