I cloned a git repository yesterday and am using it in Ubuntu. I need to find the version of that cloned repository I am using. What is the command for that?
You can use the more common git log -1
or the less used git rev-parse HEAD
If you have not pushed yes, you can check the version of origin/master
, or of FETCH_HEAD
(see FETCH_HEAD
)
cd /path/to/your/local/cloned/repo
git rev-parse origin/master
git rev-parse FETCH_HEAD
That will give you the commit ID (SHA1) of what was last fetched.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With