Welcome to my blog!

Git Common Line Interface

April 1, 2021 09:45

Git Common Line Interface (edit)

Show the URL that a local Git repository was originally cloned from?

git config --get remote.origin.url

How to Revert a Single File:

git checkout HEAD -- my-file.txt

How to Revert all Files:

git reset --hard HEAD^

Show all remote repos

git remote show origin


gitk [filename]
gitk --follow [filename]

Git log

git log -n 3

git log --author="John Smith"

git log --committer="John smith"
git log --all --decorate --oneline --graph
git log --pretty=oneline --abbrev-commit

git log --graph --pretty=oneline --abbrev-commit

Git log show

git log -n 3 ( 0ec97d946bec182ceb1189f8bad19971cc0b0d46 )
git show 0ec97d946bec182ceb1189f8bad19971cc0b0d46


Recent posts