Posts

Showing posts from June, 2019

Managing Complexity With Git Tricks

Managing Complexity With Git
* PLAN YOUR COMMITS AHEAD OF TIME / REPLAN IF YOU NEED TO
Have a road map to approach a problem (focus on gaining knowledge/reading code / talk to people) USE SINGLE PURPOSE BRANCHES
Notice when you are working something else than the purpose of the branch
Notice when if a commit has value independent of the branch - CHERRY PICK onto master. git commit -m 'Wonderful Refactoring' git checkout <Develop_Branch> git cherry-pick <SHA OF Wonderful Refactoring / Branch Name when HEAD Commit> git checkout <Feature_Branch> git REBASE <Develop_Branch> --Rebase feature branch MAKE ATOMIC COMMITS - CAN BE DEPLOYED INDEPENDENTLY (CHERRY-PICK)
Use --patch option to split changes into multiple commits. select y/n on hunks git add -p git add --patch WRITE GOOD COMMIT MESSAGES
Descriptive Commit messages and get the thoughts out of your head into the system REWRITE YOUR HISTORY TO TELL A STORY - EARLY AND OFTEN git re…