Now Up To 80% OFF
Our Lowest Price of the Year Sale ends soon
Search
Close this search box.

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


Checkout

How do you Git checkout a commit?

If you want to see when a specific behavior was introduced, you want to Git checkout a commit. Learn how to checkout a commit using the commit hash in the command line. Learn More

How do you checkout a Git tag?

Learn how to use the Git checkout command to checkout a Git tag as a branch or in a detached head state. Run the Git tag command to view the tags in your repository. 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


Clone

How do you Git clone a branch?

Let’s say you want to immediately start work on a particular branch after cloning a repository, so you want to clone the remote and checkout the branch at the same time. Or maybe you just want to clone a branch, and not the entire repo… Learn More


Commit

How do you 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

How do you amend a Git commit message?

If you’ve made a mistake in your last commit, use the Git amend command to edit a Git commit message, or amend your last commit to change its content. Learn More

How do you undo a Git commit?

If you want to undo your last commit, you can use GitKraken’s undo button or terminal to undo your last local commit and undo a commit but keep the changes. Learn More


Merge

How do you undo a Git merge?

It’s happened to the best of us. You make changes, commit them, and merge them into your main branch, only to realize you’ve made a mistake. Never fear, you can safely undo a merge in Git… Learn More


Pull

Git Pull vs Fetch

Compare the Git fetch vs Git pull actions and when you should use which command to get changes from your remote repository, and get a refresher on how to pull a remote branch… Learn More

How do you create a GitHub pull request?

In Git, the pull request feature is not built into Git itself, but is a function controlled by the remote repository hosting service, such as GitHub…  Learn More

How do you Git pull force?

You can use Git pull force to forcefully override your local branch’s history and files to match your remote…  Learn More

How do you Git pull rebase?

Git pull rebase is a method of combining your local unpublished changes with the latest published changes on your remote…  Learn More


Push

How do you Git push a tag?

Learn how to create a Git tag and push the tag to your remote repository using the command line and GitKraken, and see how to add an annotation message to your tag… Learn More

How do you Git push to a remote branch?

Learn how to Git push local changes to a remote branch using the command line and GitKraken Client, and see why you should pull before you push… Learn More

How do you force a Git push?

Learn how to force a Git push to overwrite your remote history; but beware: this can be a dangerous action, so be sure you understand how to mitigate the associated risks… 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

How do you Git rebase a branch?

Learn how to Git rebase a master branch, and see what happens when a conflict occurs… Learn More


SSH

How do you add an SSH key to GitHub?

Learn how to generate a new SSH key and how to conveniently add it to your GitHub account. SSH keys are used in Git to safely encrypt your code… Learn More


Git Hosting Service Providers

GitHub

How do you delete a GitHub repository?

To delete a GitHub repository, you will have to take some steps on GitHub to remove the remote from your account. You can also easily remove a local copy of a GitHub repo from within GitKraken… Learn More

How do you create a GitHub pull request?

In Git, the pull request feature is not built into Git itself, but is a function controlled by the remote repository hosting service, such as GitHub.  Learn More

How do you add an SSH key to GitHub?

Learn how to generate a new SSH key and how to conveniently add it to your GitHub account. SSH keys are used in Git to safely encrypt your code… Learn More

How do you fork a GitHub repository?

Learn how to fork a GitHub repository and how to work with a forked repository in GitHub. Understand the difference between clone vs fork and branch vs fork… Learn More

Additional Resources

Make Git Easier, Safer &
More Powerful

with GitKraken

Visual Studio Code is required to install GitLens.

Don’t have Visual Studio Code? Get it now.

Team Collaboration Services

Secure cloud-backed services that span across all products in the DevEx platform to keep your workflows connected across projects, repos, and team members
Launchpad – All your PRs, issues, & tasks in one spot to kick off a focused, unblocked day. Code Suggest – Real code suggestions anywhere in your project, as simple as in Google Docs. Cloud Patches – Speed up PR reviews by enabling early collaboration on work-in-progress. Workspaces – Group & sync repos to simplify multi-repo actions, & get new devs coding faster. DORA Insights – Data-driven code insights to track & improve development velocity. Security & Admin – Easily set up SSO, manage access, & streamline IdP integrations.
winget install gitkraken.cli