git
Tool #
- tags
- Version Control Evernote
git CS #
check remote paths
git remote -vremove remote
git remote rmoriginadding new remote
git remote add origin git@github.com:jaavedd9/wagtail-in-container.git git branch -M main git push -u origin main
object #
The unit of storage in Git. It is uniquely identified by the SHA-1 of its contents. Consequently, an object cannot be changed.
refs #
A name that begins with refs/ (e.g. refs/heads/master) that points to an object name or another ref …
- Note that branch names, like master, are simply refs (references) that start with refs/heads/.
- Tags all start with refs/tags/.
- So reference is a generalized form that
covers branch names, tag names, and more names.
No: the idea here is that a reference like a branch name contains a commit hash; what’s being updated is the contained hash. If refs/heads/master contains, e.g., the ID 932b573406fda922d8edbecb0d7f9ad3ce9155ec right now, and you ask Git to update it to contain d35688db19c9ea97e9e2ce751dc7b47aee21636b instead, Git can check to see whether commit 932b573406fda922d8edbecb0d7f9ad3ce9155ec is an ancestor of commit d35688db19c9ea97e9e2ce751dc7b47aee21636b. If so, this update is a fast-forward.
Each commit is a pure snapshot. Git does not compare commit snapshot contents unless and until you ask it to do so. Most of the time, it looks instead at the commit graph, which is formed by connecting each commit node (identified by its hash ID) to its parent node(s) (identified by their hash IDs).