Git Scraps
Types of HEAD
| Name | Meaning |
|---|---|
| HEAD | The latest commit |
| ORIG_HEAD | One commit before the latest |
| FETCH_HEAD | The latest commit of the remote branch |
| MERGE_HEAD | The latest commit of the merged target |
Tips
This pushes the current branch, which is convenient.
Reverting to a Specific Commit
${hash}: A specific commit${dirname}: A directory name${file_n}: A file name
Reset Operations
reflog
A useful subcommand when you accidentally run git reset. reflog is a list of commits that HEAD has pointed to, and it is stored locally only. By default, reflog entries are deleted after 90 days. Since it is local-specific, it is not retained on the remote side.
git push Freezes
Resetting git credentials
Change --local or --system as needed.