Posts

Избранное сообщение

How to compare 2 commits in git

How to compare 2 commits in git  To compare two commits in Git, you use the git diff c ommand followed by the commit identifiers.   Compare via Command Line Detailed code changes : Run git diff <commit1> <commit2> to see line-by-line differences between two commits. High-level summary : Run git diff --stat <commit1> <commit2> to view a list of changed files and line counts. Single file comparison : Run git diff <commit1> <commit2> -- <path/to/file> to restrict the comparison to one specific file.   Note: You can use full commit hashes, short 7-character hashes, or reference pointers like HEAD and HEAD~1 . Understanding Comparison Types Notation Syntax Comparison Logic Best Used For git diff commit1 commit2 Compares the exact states of the two snapshots directly. Comparing arbitrary points in history. git diff commit1 .. commit2 Identical to using a space; compares the tips of both commits directly. Standard branch-to-branch...

How to list only commits which was made after branch was splitted(checkouted)

To list only the commits made on your current branch after it split from a parent branch, use the double-dot ( .. ) syntax with git log . 💻 The Best Commands Run this command from your current branch:  git log main..HEAD If you prefer a clean, single-line overview:   git log --oneline main..HEAD (Note: Replace main with master , develop , or whatever the name of your parent branch is.) 🔍 How It Works The .. operator acts as a set subtraction tool.  main..HEAD means: "Show me all commits reachable from HEAD (your current branch), but exclude any commits that are reachable from main ." This leaves you exactly with the new commits added to your feature branch since the day you used git checkout -b .   💡 Advanced Options Depending on your workflow, you can add flags to handle specific scenarios: Exclude Merge Commits: If you have pulled or merged other branches into your feature branch and only want to see your unique work, add --no-merges : git log main..HEAD...

Disk usage analysis in linux

Disk usage analysis in linux Most common approach if you have access to instal something is ncdu command sudo apt update && sudo apt install ncdu -y

EchoAPI vs Postman

Whether EchoAPI is better than Postman depends entirely on your development needs: EchoAPI is significantly better if you want a lightweight, login-free, offline-first tool that embeds right into your code editor . However, Postman remains the superior option for massive enterprises that require deep multi-protocol support and complex, cloud-hosted team workspace permissions.   Core Differences at a Glance Feature EchoAPI Postman System Weight Ultra-lightweight; fast startup Bulky; heavy resource consumer Account Req. No mandatory login; works out of the box Mandatory login for cloud/collections Offline Mode 100% functional offline (Local storage) Highly restricted / Cloud-dependent Editor Integration Native extensions for VS Code and IntelliJ Separate native desktop application Script Compatibility 100% Postman script syntax compatible Native/Standard syntax Pricing Highly generous free tier / completely free plugins Restrictive free limits (e.g., runner limits) Why EchoAPI is...