Git is our version control system. This lesson covers the everyday moves β committing, branching, merging, working with a remote β and the habits that make your history pleasant to review.
...review: one change per commit, a subject line that says what and why. Your Git configuration follows our config example (e.g. identity, SSH key, pull behaviour). You can browse a...
Beyond commit, push and pull, Git lets you rewrite history, split and squash commits, and recover from mistakes. This lesson covers the tools we use daily to keep feature branches...
...to what you already know. Just ask. Pick one introduction to rewriting history π Pro Git, 7.6 "Rewriting History" β amend, interactive rebase, reorder, squash, split; the canonical text π Rewriting history β Atlassian...
...the trainee curriculum. Installing the skills You need an SSH key registered with your GitLab account at code.makandra.de. If you haven't done that yet, follow GitLab's guide first...
...you will need it for pushing your code anyway. Then install the trainee skills: git clone git@code.makandra.de:makandra/trainee-skills.git ~/.claude/trainee-skills ~/.claude/trainee-skills/update.sh Start Claude Code and type /trainee- β the trainee skills should...
...code before committing. Never commit a debugging breakpoint. You can achieve this by using git add -p and following the guidelines from the referred card above. If you are debugging...
...should be in a habit of reviewing your code before committing (e.g. by using git add -p). Never commit a debugging breakpoint. Debugging network traffic Your browser DevTools have a...
...our gatekeeping: feature branches, code review, and squashed commits that keep history traceable with git blame. You use our merge request checklist on every merge request. You can explain how...
...the purpose of: Feature branches Code reviews Commit squashing (and the resulting traceability through git blame) Our Merge request checklist Read the card Before you make a merge request: Checklist...
~/.ssh/config β a Host alias, so ssh reaches your staging server ~/.gitconfig β e.g. a git alias or a useful setting Note that changes to your ~/.bashrc don't affect already...
...Persist your choice in the $EDITOR variable. It defines the default for commands like git commit: # Example with vim # open the configuration file vim ~/.bashrc # navigate to the end of...
...foo instead of bar?" / "What edge cases does this class handle?" "Look at the git history of this file and summarize how it came to look like this."
...your PC, you develop in a local IDE like RubyMine, you push to our GitLab instead of GitHub, and you're on Linux β skip anything specific to macOS or Windows...
...When you're done with this exercises, discard all changes of the last exercise: git reset --hard
...don't skip these updates. Organizing your code Push all your work to a GitLab repository, at least once per day. You can create unlimited repositories in your personal namespace...
Best results in other decks
This card will show you how to use git rebase --onto without confusion. Use case You've got two feature branches (one and two), where two depends on one. Now...
...of branch two onto branch one. The easiest way for me to correctly use git rebase --onto is to count the number of additional commits of branch two and use...
git checkout is the swiss army of git commands. If you prefer a semantically more meaningful command for restoring tasks, use git restore instead. With this command you...
Info For this use case you can also use git checkout. Sources Git - git-restore Documentation Also see Git commands to discard changes Git restore vs reset