Loading…
Loading…
Git
A complete Git course for students and working developers: commits, diffs and history, branching, merging and rebasing, remotes and teamwork, undoing and recovery, investigation tools, configuration, releases, large projects, internals and graded exercises. 56 articles with practice quizzes.
Find the commit that introduced a bug with a binary search: start a bisect with good and bad commits, mark each step, automate it with git bisect run and exit codes, skip untestable commits, use custom terms, follow first parents, and save or replay a session.
kvi5hnuCode Sprout team member7 minFind the commit behind every line with git blame: reading its output, limiting it to line ranges, functions and older revisions, ignoring whitespace and formatting commits with .git-blame-ignore-revs, following moved and copied code, and digging further with log -L and log -S.
kvi5hnuCode Sprout team member7 minEvery way to name a commit in Git: IDs, branches, tags and HEAD, ancestry with ~ and ^, upstream and push references, reflog and time-based names, searching by message, files at a revision, and ranges with .., ... and ^ for log, diff and rev-list.
kvi5hnuCode Sprout team member7 minDelete untracked files safely with git clean: why -f is required, dry runs with -n, folders with -d, ignored files with -x and -X, excluding patterns, interactive mode, nested repositories, and combining clean with reset --hard to return to a pristine checkout.
kvi5hnuCode Sprout team member5 minSet unfinished work aside with git stash: push with messages, untracked files, staged-only and partial stashes, list and show, pop or apply with --index, conflicts on pop, taking one file from a stash, turning a stash into a branch, autostash, and exporting stashes in Git 2.51.
kvi5hnuCode Sprout team member8 minGit rarely loses committed work. Read the reflog, then recover from a hard reset, a deleted branch, a bad rebase or amend, a dropped stash and even staged files that were never committed, using reflog, ORIG_HEAD and git fsck. Also what expires, and when.
kvi5hnuCode Sprout team member8 minUndo a merge at every stage: abort one in progress, remove an unpushed merge or fast-forward with ORIG_HEAD, revert a pushed merge with -m 1, and avoid the trap when the reverted branch is merged again, by reverting the revert. Also undoing a pull and choosing between the options.
kvi5hnuCode Sprout team member7 minPick the right undo command: discard or unstage edits with git restore, bring back old or deleted files, move a branch back with reset --soft, --mixed, --hard and --keep, undo pushed commits safely with git revert, and look at or build on old commits with a detached HEAD.
kvi5hnuCode Sprout team member8 minKeep branch lists short and meaningful: pruning stale remote-tracking branches, finding local branches whose upstream is gone, deleting merged branches safely, recognizing squash-merged branches, Git 2.56's --delete-merged and --forked, cleaning up remote branches, and a routine for it all.
kvi5hnuCode Sprout team member7 minHow teams organize work with Git: the centralized workflow, feature branches and pull requests, GitHub flow, Gitflow with develop, release and hotfix branches, release branches for maintained versions, trunk-based development with feature flags, the forking workflow, and how to choose.
kvi5hnuCode Sprout team member8 minHow Git proves who you are to a server: HTTPS with personal access tokens and credential helpers, Git Credential Manager, SSH keys from generation to ssh-agent and ~/.ssh/config, several accounts on one machine, proxies, certificates, and fixing common authentication errors.
kvi5hnuCode Sprout team member10 minPublish commits safely with git push: the first push and -u, push.autoSetupRemote and push.default, why pushes are rejected, force pushing safely with --force-with-lease and --force-if-includes, deleting and renaming remote branches, pushing tags, refspecs, and dry runs.
kvi5hnuCode Sprout team member8 minHow to get other people's work: git fetch and remote-tracking branches, ahead and behind, git pull as fetch plus merge or rebase, choosing pull.rebase or pull.ff, divergent branches, pulling with local changes, pruning, fetching all remotes, and resetting to match the remote.
kvi5hnuCode Sprout team member8 minEverything git clone does and the options that matter: the folder name, all branches and origin/HEAD, cloning one branch, shallow clones and deepening them, partial clones with blob filters, sparse checkouts, bare and mirror clones, renaming origin, no-checkout clones, and submodules.
kvi5hnuCode Sprout team member7 minWhat a remote is and how to manage them: URLs and protocols, adding, listing, renaming and removing remotes, changing URLs and separate push URLs, remote-tracking branches and origin/HEAD, inspecting a remote with show and ls-remote, origin and upstream in a fork, and insteadOf URL rewriting.
kvi5hnuCode Sprout team member8 minCopy individual commits between branches with git cherry-pick: single commits, ranges, recording the source with -x, conflicts and empty picks, picking without committing, merge commits, and the tools that find commits one branch lacks: git cherry, --cherry-pick, rev-list and range-diff.
kvi5hnuCode Sprout team member7 minClean up commits before sharing them with git rebase -i: the todo list, squashing and fixing up, rewording, reordering, dropping, editing and splitting commits, autosquash with fixup commits, exec and break, rebasing from the root, aborting, and the new git history command.
kvi5hnuCode Sprout team member9 minWhat git rebase really does and when to use it: replaying commits onto another branch, resolving conflicts with continue, skip and abort, ours and theirs swapped, --onto, stacked branches with --update-refs, autostash, testing every commit, recovering from a bad rebase, and rebase versus merge.
kvi5hnuCode Sprout team member10 minWhat a merge conflict is and how to resolve one calmly: reading conflict markers and the zdiff3 style, the three stages, git status and diff during a conflict, taking one side safely, modify/delete and binary conflicts, aborting and redoing, merge tools, rerere, and checking a resolution.
kvi5hnuCode Sprout team member11 minHow git merge combines branches: fast-forward and three-way merges, the merge base, choosing --ff-only, --no-ff or squash merges, previewing and stopping a merge, merge strategies and -X options, unrelated histories, and reading merges in the history.
kvi5hnuCode Sprout team member10 min