Git History in PRs

Git History in PRs Suppose you have a big feature, and you are creating a pull-request with all your changes. How do you organize the changes? Only one commit? One per sub-feature or sub-fix? How do you make that division? Or maybe you could organize the commits in a way that is helpful for reviewers… But how? This post try to show different approaches I have found during my years in the workforce. [Read More]

Add changes to your last commit

Have you ever created a commit with a meaningful message and, later wanted to add or modify something to it? And what about if you pushed that commit? Here we are going to see how you add changes to a commit, independently of if it was pushed or not. How-to Let’s suppose we have just pushed a commit and we want to add another change to it. This process is called amend. [Read More]

Rewrite git branch history

Rewrite your git branch history Ever had a pushed branch that is completed and ready for review but the git history is too long and full of commits wit. How to The process is very clear. You only have to get the changes, move your point to the branch you want to merge (usually master), unstage everything, creating new committs, and force push the changes. Let us see the process step by step: [Read More]