A guide to Git stashing
Learn all you need to know about Git stashing, including how to stash changes, apply, list, and delete stashes.
The Git snippet collection contains a variety of short tips and tricks for all currently maintained versions of git. It includes most commonly-used commands and covers various use-cases in the form of simplified documentation, complete with multiple examples.
Learn all you need to know about Git stashing, including how to stash changes, apply, list, and delete stashes.
Do you want to see a list of all local branches sorted by date? Here's a simple command to help you with that.
Having trouble deleting branches in Git? Here's a guide to help you delete local, remote, detached, and merged branches.
View all commits in a specific date range using git log
.
Completely purges a file from history.
Prints a list of all merged local branches.
Learn how to view your "undo" history using git reflog and reset your repository to a previous state.
Did you accidentally commit to master
instead of a feature branch? Here's how you can move those commits to a new branch.
Learn how to merge a branch in Git with or without creating a merge commit, depending on your team's workflow.
Git defaults to fast-forward merging when possible. But, what if you want to disable it by default? Let's see how you can do that.
Prints a list of all local branches.
Prints a summary of changes between two given commits.
Prints a visual graph of all commits and branches in the repository.
Prints a list of lost files and commits.
If you want your team to follow a common format for commit messages, you can set up a commit message template to make it easier.
Learn how to push and pull changes between local and remote repositories.
Learn how to quickly and easily reset your local master
branch to match the one on the remote.
Learn how to view a short summary of your Git commits using git log.
Is your Git repository getting bloated? Optimize it by garbage collecting loose objects.
Prints all commits by the specified author.
Effortlessly create upstream branches on push by enabling a simple git config setting.
Configure user information for Git to associate commits with a user.
Clones missing submodules and checks out commits.
Fetches the latest changes from the remote.