Skip to content

Instantly share code, notes, and snippets.

@rotoglup

rotoglup/GIT usage.md

Last active Nov 24, 2020
Embed
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