Git log: narrowing history to a file
git log shows reachable commit history. A path narrows inspection to a particular area, for example git log -- app/Models/Entry.php.
Software, devices and technical concepts, explained clearly.
git log shows reachable commit history. A path narrows inspection to a particular area, for example git log -- app/Models/Entry.php.
git merge incorporates changes from another history into the current branch. A linear relationship can allow a fast-forward; divergent history can produce a separate merge commit.
git mv moves or renames a tracked path and updates the index on success. It combines the working steps needed for that change.
git pull first fetches data and then integrates it according to the selected mode. With --ff-only, integration is allowed only when the branch can advance linearly.
git push sends required objects and requests updates to selected remote references. For example, git push origin feature targets that branch rather than necessarily every local branch.
git rebase replays a series of commits on another base. The resulting commits normally have new identifiers even when their intended changes are preserved.
A remote such as origin is a local name for connection settings to another repository. git remote -v displays fetch and push addresses.
git reset has different forms affecting HEAD, the index and working files. --soft preserves the index and working contents, while stronger modes have different effects.
git restore restores selected paths in the working tree or index. With --staged, the default source is HEAD; otherwise, working files normally use the index as their source.
git revert creates a new commit reversing an earlier change. The old commit remains in history rather than being erased.
git rm --cached removes a selected file from the index while leaving its working copy on disk. A commit is needed to record that change in history.
git shortlog summarizes history by author and title. -s shows counts, while -n orders by those counts.