Use Ctrl+G to navigate to a line in the editor.
Use Ctrl+F12 to navigate the code base.
git commit
git commit --amend use this to amend the last commit.
git commit --amend --author="Author Name <[email protected]>" to change the author.
For example, if your commit history is A-B-C-D-E-F with F as HEAD, and you want to change the author of C and D, then you would:
- Specify git rebase -i Bif you need to edit A, usegit rebase -i --root
- Change the lines for both CandDfrom pick to edit
- Once the rebase starts, it would first pause at C
- You would git commit --amend --author="Author Name <[email protected]>
- Then git rebase --continue
- It will pause at D
- Then you would git commit --amend --author="Author Name <[email protected]>again
- git rebase --continue
- The rebase would complete
- git push -fto update your origin with the updated commits