Customize Git using aliases for common operations
Increase your productivity and reduce your cognitive load by creating aliases for many common git operations.
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.
Increase your productivity and reduce your cognitive load by creating aliases for many common git operations.
Learn all you need to know about Git stashing, including how to stash changes, apply, list, and delete stashes.
Looking for the merge commit where the changes from a given commit were merged into a branch? Here's how you can find it.
Did you accidentally commit sensitive information? Learn how to completely purge a file from Git history.
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.
Reorder, squash, and edit commits interactively using Git's interactive rebase feature.
View all commits in a specific date range using git log
.
Looking for a way to list all merged branches in your Git repository? Look no further.
Ever wanted to commit as someone else? Maybe change the author of an existing commit? Here's how.
Learn how to view all commits that manipulated a specific string in a Git repository.
Learn how to filter branches based on whether they contain a specific commit or not.
Learn how to find lost files and commits in a Git repository.
Did you accidentally commit to master
instead of a feature branch? Here's how you can move those commits to a new branch.
Have you ever made a commit only to realize that a file should not have been included? Let's see how you can fix this!
Altering Git history to split a commit sounds intimidating, but it's not that hard. Let's walk through the process step by step.
Learn how to view a list of all local or remote branches in a Git repository.
Learn about Git's fast-forward mode and its benefits when merging branches, so you can decide if it's a good fit for you and your team.
Learn how to force update a remote branch after rewriting the Git history locally.
Learn how to merge a branch in Git with or without creating a merge commit, depending on your team's workflow.
Learn how to view your "undo" history using git reflog and reset your repository to a previous state.
Learn how to view a summary of changes between two Git commits, using a single command.
If you're looking for a way to find commits by a specific author or committer in a Git repository, look no further.
Learn how to quickly and easily reset your local master
branch to match the one on the remote.