rebase in which commits you are interested in# ( in our case these are the last 5 commits )$ git rebase -i HEAD~5This will put you into the rebase mode, where you can select what you want to NBA 2K18 MT  with these changes.pick 5c6bb74 some refactoringpick 91dbdfa other refactoringpick 3080d61 iteration 1pick 4e4f56a iteration 2pick 1890f70 iteration 3# Rebase a37f00c..1890f70 onto a37f00c## Commands:# p, pick = use commit# r, reword = use commit, but edit the commit messagee,


commit, but stop for NBA 2K17 MT Coins amending# s, squash = use commit, but meld into previous commit# f, fixup = like "squash", but discard this commit's log message# x, exec = run command (the rest of the line) using shell## If you remove a line here THAT COMMIT WILL BE LOST.# However, if you remove everything, the rebase will be aborted.#You can now alter the changes. In this case we want to group them and change their commit messages. The result could look like this:reword


some refactoring # changes the commit messagefixup 91dbdfa other refactoring # groups this commit with the previousreword 3080d61 iteration 1 # changes the commit messagefixup 4e4f56a iteration 2 # groups this commit with the previousfixup 1890f70 iteration 3 # groups this commit with the previousAfter you have done this, you will be prompted for the commit messages of the two rewords. When finished, you have only two commits left and they have the proper change


. You can now push this without having a bad conscience. This is how the nba18mt history now looks like: $ git logcommit 70f40f9504e5721c7bce32fe9a8c792cddce6acfAuthor: Martin ZielinskiDate: Thu Jul 7 23:50:14 2011 +0200feature xyzcommit 4e47d572508b1109097f73959fe7be02e23ee437Author: Martin ZielinskiDate: Thu Jul 7 23:49:22 2011 +0200refactoring old codeGit In A DropboxThat one is pretty obvious, but extremely useful, especially for private projects. You can push