60e2f3...)?
a commit's ID is the SHA-1 hash of the contents of the commit (the tree + commit message + date + parent commit(s) + a few more things)
You can refer to it by any prefix, like
60e2f3cdf7b938712a4c3d or
60e2f3c or even
60e2, as long as the prefix is at least 4 characters and there's only 1 commit with that prefix.
commits can't be edited in any way.
git commit --amend lets you "amend" a commit, but actually
it makes a new commit and your old commit will still be there if you
want to go back to it.
commits can't be edited in any way, and a commit's parent is part of the commit.
$ git cherry-pick 60e2f3 lets you "move" a commit onto a
different branch, but it actually creates a new commit with the new
parent.
$ git checkout $SOME_COMMIT_IDcommit IDs always represent the exact same thing. So if you and your colleague both run
$ git checkout $SOME_COMMIT_ID
in a repository, you'll both see all the same files
ok, technically if you manufacture another commit that hashes to the exact same SHA-1 hash then this isn't true, but this is always true in practice400)?
git only stores whether the file is executable or not, not the full set of permissions.
60e2f3?
git show 60e2f3
You can also do
$ git show 60e2f3 --stat
to see a summary of files changed.
As long as the commit is on a branch, you're safe. But if the commit isn't on any branch and you run
git gc,
git gc will by default remove old commits that aren't on any branch to save disk space.
git reflog
$ git reflog shows you the history of every commit you've checked out. It can be slow to sift through but everything is there.