How to rename a local and remote branch in Git? Shit Happens!! Sometimes, you named a branch wrong or want to make it more meaningful. Doing it locally is quite simple.
How to find the commit that broke something after a merge in Git? Tracking the commit that introduced a bug after a big merge can be time-consuming. Luckily git offers a great binary search facility in the form of `git-bisect.`
How to revert pushed commit from the repo? Despite all the fixes you try, faulty commits occasionally make it into the central repository. Still, this is no reason to despair, since git offers an easy way to revert single or multiple commits.
How to avoid repeated merge conflicts? I would recommend all developers to set up this globally; you will love it and won't even remember it.
How to remove a file or directory from Git without deleting it from your working directory? There are several situations when you have to remove some part of your code from git history. Doing so is very easy if you know these commands.
How to remove a file or directory from git without deleting it from your working directory? You have to remove some part of your code from git history in several situations. Doing so is very easy if you know these commands.
How to discard local modifications in git? Everybody has their own way of writing code, and there are times when you try out a few ways of creating a functionality or fixing that nasty bug, which is not such a good way of doing it. If you want to discard your current changes, you can do it easily by checking out the modified files.
How to stage changes one by one after reviewing in git? Usually, it is recommended to create a new fix branch from your master and push it back, but sometimes we kind of go lazzy. In those moments, I simply make the changes and add them one by one using the following command.
How to checkout to a remote branch that someone else is working on in git? Ever been in a situation where you need to collaborate with someone, but you don't have that branch on our local repo? How do we get that, as doing a checkout will not work?
How to stop password prompts on any git command in macOS? Ever since macOS 10.12 Sierra update for ssh, people have been facing issues with git prompting for ssh passphrase every time they run any git command.