Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are common antipatterns of using Git? [closed]

As a Git newbie, I realized that I have been using it as if it were Subversion. e.g. always working on master, not committing locally before pulling changes etc. This often results in avoidable manual merge situations. What are other common antipatterns of using Git?


1 Answers

Big ball of changes

When you are writing commit message, and you don't know what to put in single line summary of changes, it does probably mean that you put too many independent things in a single commit. Better to split commit into smaller, using "git rebase --interactive", and/or "git add --interactive" and friends (like "git stash --keep-index" to test stashed changes).

Having single issue per commit will help tremendously when trying to find bug using "git bisect".

like image 179
Jakub Narębski Avatar answered Sep 13 '25 08:09

Jakub Narębski