Skip to content

ansumanm/Docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

82 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

List of some commonly used commands

Table of contents

Git reference

See changes in a commit hash

git show <commit-hash> # Show commit information
git show <commit-hash> --patch # Show diff of the changes committed
git show <commit-hash> -p

Find the best common ancestor between two branches

git merge-base feature_branch main # Find the commit hash where feature_branch was created from main

Git graphical log

git log --graph --oneline --all

Git reflog

git reflog feature_branch

Tags

git tag # List of tags
git show-ref --tags # More details about tags
git fetch --tags # Fetch tags from remote repository
git ls-remote --tags origin # List tags on remote

Delete Branch

# Delete remote branch
git push origin --delete branch_name

# Delete local branch
git branch -d branch_name

# Force delete local branch
git branch -D branch_name

# After deleting remote branches, sync information with local
git fetch origin --prune

About

Contains cheatsheets, how-tos etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published