Git Problems

Solutions to Common Issues

Branching

How do you create a Git branch?

See how you can create and checkout a branch with the same command... Learn More

How do you rename a Git branch?

You can rename a Git branch using the git branch command followed by... Learn More

How do you switch a Git branch?

To switch to a Git branch, you're going to use the git checkout command followed by the branch name... Learn More

How do you checkout a remote Git branch?

To checkout a remote Git branch you will use the git checkout command followed by the branch... Learn More

How do you delete a Git branch locally?

Delete a Git branch locally using the git branch command followed by... Learn More

How do you delete a remote Git branch?

Deleting a remote Git branch works differently than deleting a Git branch locally... Learn More

How do you view your Git branch list?

To view a list of your Git branches, you can run the git branch command... Learn More

How do you merge a Git branch?

To merge a feature branch into master, you will first need to... Learn More

How do you set an upstream branch in Git?

You will use the git push command to set an upstream branch... Learn More

How do you pull a remote Git branch?

To fetch changes from a remote Git branch, you're going to use the git pull command. Learn how to use fast foward only, merge, or rebase when combining file changes in Git... Learn More


Cherry Pick

Can you cherry pick from another repository in Git?

It is possible to cherry pick from another repo using the command line... Learn More

Can you cherry pick multiple commits?

Git 1.7.2 introduced the ability to cherry pick a range of commits... Learn More


Commit

How to Revert a Commit in Git

To undo a Git commit you can use the git revert command. Learn how to revert changes in Git, revert multiple commits, and change your Git commit message in the process... Learn More


Rebase

How do you perform an interactive rebase?

If you want to undo a Git commit that is not your last commit and you don't want to loose any work, you can use this tool. Learn More

When to Git rebase vs merge?

How do you decide whether to perform a Git rebase or a Git merge? There are related benefits and risk to both. Learn when to use Git merge vs rebase... Learn More

Get updates when we publish new concepts by signing up for our newsletter!