Using git reset
What git reset actually does — soft, mixed and hard — with worked examples for undoing commits and unstaging files without losing work.
- sysadmin
- devops
- linux
- git
Tag
9 posts
What git reset actually does — soft, mixed and hard — with worked examples for undoing commits and unstaging files without losing work.
How JavaScript's optional chaining operator replaces defensive null checks when reading nested properties, and where it stops helping.
FizzBuzz in Python and JavaScript, why interviewers still ask it, and what a clean solution looks like in each language.
Replace loops with map, reduce and filter in JavaScript and Python for array code that reads as what it does rather than how it does it.
Two approaches to the classic anagram interview question — sorting and character counting — implemented in both Python and JavaScript.
Making HTTP requests in Python with the requests library — GET and POST, query strings, headers, JSON payloads and handling the response.
Replace print statements with Python's logging module: verbosity levels, handlers, formatters, and sending log output where you actually need it.
How to parse command line arguments in Python with argparse, including the improvements Python 3.11 brought to the module.
A beginner's guide to Git — installing it, setting your identity, staging and committing changes, and understanding how distributed version control works.