How To Revert a Merge in GIT

Author: , November 19th, 2020

How To Show All Branches In GIT

Author: , October 29th, 2020

Show All Branches, Local and Remote

Show Local Branches

Show Remote Branches

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

How To Find a Git Commit ID in Branches and Merges

Author: , February 7th, 2020

First, get on the branch that you know already has the commits you are looking for:

Copy-and-paste the commit(s) you want:

~or~

Optionally, display the code changes for a visual confirmation:

Finally, extract the list of branches that contain the desired commits:

Example:

How To Show the Origin in Git

Author: , January 30th, 2020

Recently, I wanted to see the “origin” of the git repository I was working in. The command is: git remote -v For example:

How To Change Your Commit Message in Git

Author: , December 2nd, 2019

Not pushed + most recent commit:

How To Show Filenames With git log

Author: , June 3rd, 2019

To display the filenames included in each commit, just add the –name-only argument to git log: