Configure Git's default text editor
Learn how to configure the text editor used by Git for commit messages and other text editing tasks.
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 how to configure the text editor used by Git for commit messages and other text editing tasks.
If you need to copy a file from another branch to the current branch, here's an easy way to do it.
Learn how to apply changes introduced by one or more commits to your current branch (cherry-picking).
Made a mistake with your branch name? Learn how to rename a local or remote Git branch.
Learn how to effortlessly amend the last commit's message or contents using Git and fix any mistakes you might have made.
Learn how to view the current status of the working tree in Git.
Learn how to add multiple authors to a git commit with this quick and easy tip.
Have you accidentally deleted a file? Or maybe you need to restore a file that was deleted? Here's how Git can help you.
Made some changes you don't want to keep? Learn how to discard uncommitted or untracked changes in Git.
Learn how to effectively use Git's staging area, by adding or removing files from it.
Mistyping commands often? Enable Git's autocorrect feature to automatically fix them.
Learn how to create a new Git branch and optionally set up a remote tracking branch.
Get the name of the current branch in Git.
Want to compare the changes between two branches in Git? Here's how you can do it.
Learn how to open the Git configuration file in the Git text editor, for editing.
The first step is often the hardest, yet creating a Git repository is as simple as running a single command.
If you're working with a team using different operating systems, configuring line endings can help maintain consistency.
View differences between staged or unstaged changes and the last commit in Git.
Learn how to easily switch between branches in Git.