Generally, We will add the changes via PR(pull request) to the long-running branches like develop, release, and main branches. But sometimes (for me it happened most of the time) we commit the changes to the main / develop. While pushing to remote we will identify the problem.

I will follow the below steps to move the latest commits to the new feature branch.

Requirement: Commit C7 should be converted as PR to develop branch

Solution:

--

--

Problem: Sometimes we need to know our public IP. Let's take an example, You are creating a script/program and we are giving the server’s public IP. If you don’t have static IP then every time we need to update it manually.

Solution: If you have curl then it is pretty simple like below

$MY_PUBLIC_IP=$(curl -s ifconfig.co/)
$echo $MY_PUBLIC_IP
88.22.11.22

Note:

  1. We can use ifconfig.io and other websites too.
  2. If you are behind proxy or NAT then it gives the IP addresses of proxy or NAT respective.

--

--