If you need to do a git diff, but the first file it shows is a huge file, e.g. a Javascript library that got replaced, you can skip it in two steps: Type /^diff – to enter search mode with a slash and then search for diff – at the beginning of a line -… Continue reading Git diff skip to next file?
Tag: git
How to jump to a specific git commit?
To jump to a specific commitId: git checkout <commitId> To return to the tip of the branch: git checkout <branchName>
Changing git settings to clear the diff output
If you’d like to have the output of git diff, git diff –staged etc. cleaned up after showing, instead of cluttering the terminal window, change the pager config as follows: git config –global core.pager 'less -+X -+F' As a result, each call to the above commands will be listed in a separate "window", which does… Continue reading Changing git settings to clear the diff output
Reword a commit message without changing the commit date
If you want to rebase-edit the commit message in an old commit, and keep the original commit date, you can do that using the –committer-date-is-author-date flag. Here’s how: Find your old commit that you want to edit and copy its hash Run git rebase -i hash^ Find your commit in the list that shows up… Continue reading Reword a commit message without changing the commit date
AWS CodeCommit: Repository does not exist
Troubleshooting Amazon CodeCommit not letting you into your repository over an SSH connection.