Skip to content

Instantly share code, notes, and snippets.

@rotoglup
Last active November 24, 2020 14:37
Show Gist options
  • Save rotoglup/a9eda879314834bf06ef7639c3d23398 to your computer and use it in GitHub Desktop.
Save rotoglup/a9eda879314834bf06ef7639c3d23398 to your computer and use it in GitHub Desktop.
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