Apr 14, 2021

git merge reset merge

  • git fetch && git checkout master
  • # You want to pull master to your branch
    • git checkout branch1 (from master)
  • git merge master (or git pull origin master)
    • CONFLICT (content): Merge conflict in site/test.py
    • --- say some conflicts & u want to move to master / branch2

    • git checkout master
      • ----> error: you need to resolve your current index first
    • git branch ## branch1
    • git reset --merge
    • git checkout master # will work

    Apr 3, 2021

    How to evaluate time taken for urls using curl

    • Configure ~/.curlrc
      • Add file ~/.curlrc & add the below
      • -w "dnslookup: %{time_namelookup} | connect: %{time_connect} | appconnect: %{time_appconnect} | pretransfer: %{time_pretransfer} | starttransfer: %{time_starttransfer} | total: %{time_total} | size: %{size_download}\n"
    •  How to call urls using Curl?
      • curl -so /dev/null "https://www.site.com/test/video.mp4"
        • dnslookup: 0.013 | connect: 0.335 | appconnect: 1.090 | pretransfer: 1.090 | starttransfer: 1.666 | total: 24.770 | size: 128750670
      • curl -so /dev/null "https://cdn.site.com/test/video.mp4"
        • dnslookup: 0.013 | connect: 0.051 | appconnect: 0.311 | pretransfer: 0.311 | starttransfer: 1.287 | total: 11.556 | size: 128750670

    We can observe 2nd url (CDN) takes almost half the time as the first once.