Best of Version ControlSeptember 2024

  1. 1
    Article
    Avatar of colkgirlCode Like A Girl·2y

    Mastering Git: Hidden Commands Every Developer Should Know

    Git offers several hidden commands beyond the commonly used ones. Commands like git stash, git reflog, git bisect, git cherry-pick, git reset --hard, git blame, git clean, and git shortlog can significantly enhance your version control skills. These commands help in temporary save uncommitted changes, recover lost commits, identify problematic commits, selectively apply commits, reset code to a specific commit, track changes to specific lines, clean up untracked files, and summarize contributions by author.

  2. 2
    Article
    Avatar of faunFaun·2y

    A Guide to Git Branching Strategies

    Source control management is crucial for efficient collaboration and versioning in software development. This guide focuses on Git branching strategies, primarily trunk-based development and Gitflow. Trunk-based development facilitates fast integration and deployment using a single long-lived branch, while Gitflow supports parallel development and is ideal for established products with regular release cycles. Understanding these strategies helps teams choose the best workflow based on their size, experience, and deployment needs.

  3. 3
    Article
    Avatar of lobstersLobsters·2y

    Managing dotfiles with chezmoi

    Managing dotfiles with version control provides benefits like backup and recovery, consistent configuration, and ease of migration. While traditional tools like GNU Stow have limitations, chezmoi offers a comprehensive solution with features such as templating, password manager support, full file encryption, and cross-platform capabilities. chezmoi simplifies dotfile management by integrating closely with version control systems, supporting encrypted secrets, and handling various edge cases. It allows easy setup and management of dotfiles across multiple machines with minimal dependencies.

  4. 4
    Article
    Avatar of adamjAdam Johnson·2y

    Git: avoid reset --hard, use reset --keep instead

    When undoing commits in Git, it's recommended to use 'git reset --keep' instead of 'git reset --hard' to avoid losing uncommitted changes. 'reset --hard' is highly destructive as it discards unsaved work, making recovery difficult. In contrast, 'reset --keep' preserves uncommitted changes and fails if it jeopardizes unsaved work. The post provides practical examples and suggests setting an alias for convenience.

  5. 5
    Video
    Avatar of vscodeVisual Studio Code·2y

    The easiest way to visualize your repo

    Discusses two methods for visualizing a repository history: the git log graph command and VS Code’s built-in Source Control graph. The author finds the VS Code method more intuitive, as it allows easy scrolling through history, viewing branching structures, and inspecting individual commits.

  6. 6
    Article
    Avatar of devtoDEV·2y

    Unlisted GitHub Repositories

    Creating unlisted repositories on GitHub can be accomplished by using a public host repository with multiple branches, each representing a different unlisted repository. This approach prevents clutter on your profile and allows for sharing complex code snippets or reproducing issues without creating new repositories. The process can be streamlined with scripts and git aliases, though it has limitations like the inability to support multiple branches, issues, or pull requests.

  7. 7
    Article
    Avatar of tilThis is Learning·2y

    Style guide to write git history

    This guide provides a structured approach to writing maintainable Git history. It categorizes commit messages with prefixes like 'feat', 'chore', 'refactor', 'deploy', and 'docs' to clearly indicate the type of change. For large features, it recommends dividing branches into smaller modules using numerical suffixes. Key general practices include creating PRs, consistent naming, using present tense in commit messages, and utilizing squash merges when appropriate.

  8. 8
    Article
    Avatar of gitmelivegitme·2y

    Learn Git and GitHub with Me: A Beginner's Guide "Dive into the world of version control with Git and GitHub. This blog post provides a step-by-step guide for beginners to understand and use Git and GitHub effectively."

    This beginner's guide provides a comprehensive introduction to Git and GitHub, explaining essential concepts and basic commands to help newcomers get started with version control.

  9. 9
    Article
    Avatar of hnHacker News·2y

    Why GitHub Actually Won

    GitHub's success can be attributed to its timing and focus on developer experience. Starting when distributed version control systems were gaining traction, GitHub stood out by being user-centric, embracing open-source contributions, and simplifying permissions with features like forking and pull requests. The platform's strong backing from the Ruby community and key influences like Linus Torvalds and the Linux project further solidified its dominance. Ultimately, GitHub's taste in understanding and improving developer workflows set it apart from competitors like SourceForge and Google Code.