- Clone the repo.
- Use
git rebase -i --root - vim will open. Select the commits you want to modify by changing
picktoedit. If you would like to change all the commits, perform the following replace::%s/^pick/edit/g. This command changes all instances of "pick" at the start of lines to "edit". - You will now be shown all the selected commits one by one. Each commit message will be displayed. You have two options:
- If you would like to keep the commit author details the same, do a
git rebase --continue. - If you would like to change it to a different name/email, do
git commit --amend --reset-author. If--reset-authoris specified, it will use the details from your git config. (If you need to specify an alternate name/email, you can do so with--author="John Doe <john@example.com>". If you would like to change the time to a previous date, you can do so with--date "2 days ago".)
- If you would like to keep the commit author details the same, do a
- Do the same for all the commits and finish the rebase.
- Perform
git push -f origin masterto
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Rob Pike's 5 Rules of Programming | |
| Rule 1. You can't tell where a program is going to spend its time. Bottlenecks occur in surprising places, so don't try to second guess and put in a speed hack until you've proven that's where the bottleneck is. | |
| Rule 2. Measure. Don't tune for speed until you've measured, and even then don't unless one part of the code overwhelms the rest. | |
| Rule 3. Fancy algorithms are slow when n is small, and n is usually small. Fancy algorithms have big constants. Until you know that n is frequently going to be big, don't get fancy. (Even if n does get big, use Rule 2 first.) | |
| Rule 4. Fancy algorithms are buggier than simple ones, and they're much harder to implement. Use simple algorithms as well as simple data structures. | |
| Rule 5. Data dominates. If you've chosen the right data structures and organized things well, the algorithms will almost always be self-evident. Data structures, not algorithms, are central to programming. | |
| Pike's rules 1 and 2 restate Tony Hoare's famous maxim "Premature |