January 17, 2024

Resolving git push errors

Git can be tricky, especially when you get errors. It’s important to understand what these error messages mean. In this article, we’ll look at two common Git push errors and explain in simple terms how to fix them. Error 1: Mismatched Branch Names fatal: The upstream branch of your current branch does not match the name of your current branch. To push to the upstream branch on the remote, use git push origin HEAD:main To push to the branch of the same name on the remote, use git push origin HEAD To choose either option permanently, see push. Read more

December 19, 2022

Git Stash: deep dive

git-stash is a powerful subcommand in Git, that stores changes in a hidden place. Staged or unstaged changes or untracked files are stashed in a stash stack and the working directory is reverted to the last commit. It is useful when changes made to a branch is not ready to be commited and there is a need to switch to another branch. error: Your local changes to the following files would be overwritten by checkout: index. Read more

Powered by Hugo & Kiss.