If you just made a commit and realized it was on the wrong branch, use: git reset HEAD~1 git checkout correct-branch This will remove the unpushed commit so that you can make the change on the correct branch. Note: You will have to write your commit message again. The best […]
Tag: git
Powerful git Commands (updated 2/11)
Pickaxe (with & without specified file) Search diffs for a particular string. Purpose: If you’re trying to figure out when a particular line was changed and by who. Across all diffs In a Specific File Source More Documentation on git log –merged Purpose: When you’re trying to identify branches that […]