Introduction to Git and GitHub
main_final.py, main_final2.py, main_really_final.py - sound familiar? We look at how Git replaces copies like these with a commit history, how a repository on GitHub differs from a local one, and what to install so Claude Code can work with Git and GitHub itself.
Everyday work with Git
Clone a project, pick only the files you need in the Commit window, check the diff and send your commits with Push. Clutter such as node_modules/ and personal IDE settings gets cut off with .gitignore before it ever lands in the repository.
Branching and merging in Git
How do you try a risky rework without touching the working version? We create a branch, switch between branches, merge it into main and set up a conflict in the README on purpose, then resolve it in the IDE's three-pane window.
A pull request from creation to merge
A pull request ties the diff, review comments and checks together in one place, and the decision to merge stays with a person. We go from a new branch to Merge and deleting the branch, plus three commit rules that make a review easy to read.
Undoing and recovering changes in Git
Your team lead needs a bug in main fixed right now, and your branch holds half a day of uncommitted work. We sort out Amend, Rollback, Reset, Revert and Shelve: what each one undoes, what is lost for good, and why force push should never become a habit.
Creating a repository, rebase, and secrets
Deleting a file with a password in a new commit is not enough, because the secret stays in the earlier commits. We cover making a repository out of a plain folder, rebase versus merge on a single diagram, and what to do, in order, once a key has leaked.
Git worktree: two tasks in two working folders
You are halfway through adding search to a locale catalog when a caption needs an urgent fix. Git worktree gives the second task its own working folder and its own Claude Code session, and at the end the result moves into main and the extra folder goes away.
GO TO FULL VERSION