Blog
Git guides, comparisons and tips · Page 2
Practical guides to Git and Git GUIs, and sourced comparisons of the desktop Git clients developers use, from the team behind GitTree.
Explore the articlesExplore the articles
- Comparisons4 min read
Is there a Bitbucket desktop app? The Git clients that work with it
Atlassian does not ship an app called Bitbucket Desktop. Its desktop Git client is Sourcetree, and several others connect to Bitbucket too. Here is how they compare, including on Linux and for pull requests.
Updated
- Git guides6 min read
Git rebase branch: how to rebase safely, step by step
Rebasing takes one command. Doing it safely takes a few more: save the old tip, handle each conflict, compare the result, and push without overwriting a teammate. Here is the whole sequence.
Updated
- Git guides4 min read
How to revert a merge commit in Git without rewriting history
A merge commit has two parents, so Git needs to know which side to keep. Here is how to pick the parent, undo the merge safely on a shared branch, and bring the work back later.
Updated
- Git guides4 min read
How to delete a Git branch, locally and on the remote
A local branch and its remote copy are two separate things. Here is how to delete each one, what the common errors mean, how to clean up stale refs, and how to recover a branch you deleted by mistake.
Updated
- Git guides3 min read
How to restore a deleted file in Git
The right command depends on one thing: how far the deletion got. Here are the three cases, how to find the commit that removed a file, and what Git cannot bring back.
Updated
- Git guides6 min read
Git rename branch: change a local or remote branch name
Renaming a local branch takes one command. Remotes have no rename, so you push the new name and delete the old one. Here is the whole sequence, including what your teammates need to do.
Updated
- Git guides5 min read
Git add -p: stage specific lines and make focused commits
Two unrelated changes ended up in one file. Commit the fix now and leave the refactor for later: a practical guide to the staging area, patch mode and GitTree’s line selection.
Updated
- Git guides8 min read
How to run GitHub Actions and GitLab CI locally before you push
Stop pushing “fix ci” commits to see whether a workflow passes. Run the same jobs on your own computer in Docker with act or gitlab-ci-local, in minutes, then push once. Includes a ready-to-run sample and a visual walkthrough.
Updated
- Git guides6 min read
How to recover a dropped Git stash, a deleted branch or lost commits
A dropped stash or a deleted branch is rarely gone for good: Git keeps the commits until garbage collection removes them. Find them with the reflog or git fsck, check what they hold, and put them back on a branch before it is too late.
Updated
- Git guides6 min read
Create and switch Git branches: choose the right starting point
A new branch is easy; starting it from the wrong commit is the expensive part. Learn how to create, switch and track branches, protect unfinished edits, and check the result in GitTree.
Updated
- Git guides6 min read
Git stash: save changes, switch branches and restore your work
An urgent fix interrupts unfinished work. Save it with Git stash, restore the right entry later, and understand apply, pop and conflicts before you click. Includes a visual GitTree walkthrough.
Updated
- Git guides10 min read
Git cherry-pick: copy a commit to another branch and fix conflicts
Need one bug fix without merging the whole feature branch? Learn how cherry-pick works, choose the correct destination, handle dependent commits, and review the result visually in GitTree.
Updated










