How To List All Tags With The Message In git

Author: , April 11th, 2023

How To Change Your GIT Name and Email Address Globally and Per Repository

Author: , June 17th, 2021

To update your git user name and email address for all repos:

To update your git user name and email address for a specific repo:

How To Undo A Conflicting Merge in GIT

Author: , June 8th, 2021

shell> git merge branch-with-messy-changes

shell> git status

IMPORTANT NOTE: Previous versions of git used different commands for this operation: Latest version: git merge –abort Older than version 1.7.4: git reset –merge Older than version 1.6.2: git reset –hard

How To Configure GIT To Push The Current Branch Only

Author: , March 16th, 2021

Recent changes to git have made the push default choice a bit confusing – “matching” vs. “simple” I picked “matching” when prompted. This means that git push by itself will try to push ALL local branches, not just the one you are working on. Personally, I find that a bit mad, so I decided to […]

How To Revert a Merge in GIT

Author: , November 19th, 2020

To revert the local branch:

To revert the remote branch AFTER the previous step has been performed:

How To Show All Branches In GIT

Author: , October 29th, 2020

Show All Branches, Local and Remote

Show Local Branches

Show Remote Branches

To fetch all remote branches locally

How To Add and Use Tags In GIT

Author: , August 10th, 2020

For more information about Tagging in GIT, please visit: https://git-scm.com/book/en/v2/Git-Basics-Tagging Add an Annotated Tag:

Add a Lightweight Tag:

Show all tags:

Push all tags:

Add a Tag Later:

Use a Tag:

How To Revert the Last git Commit

Author: , July 9th, 2020

shell$ git log | head -1 commit a203e1bd04718bff10a3df4a3389c493c97c0432 Use the commit string as the last argument to the git revert command: shell$ git revert -m 1 a203e1bd04718bff10a3df4a3389c493c97c0432

How To Find All git Commits Containing a Specific Log Message

Author: , July 9th, 2020

Show commits and messages that match

Include code diffs

Include file names

How To Find Commits With Code Containing a String

Author: , February 7th, 2020