Wednesday, December 27, 2023

How to add git remote origin ?

 Add  git remote origin 


PS C:\git-lab\demo1> git remote -v

PS C:\git-lab\demo1> 

PS C:\git-lab\demo1>

PS C:\git-lab\demo1> git remote add origin https://github.com/anuragkumarjoy/terraform-code.git

PS C:\git-lab\demo1> 

PS C:\git-lab\demo1>

PS C:\git-lab\demo1> git remote -v

origin  https://github.com/anuragkumarjoy/terraform-code.git (fetch)

origin  https://github.com/anuragkumarjoy/terraform-code.git (push)

PS C:\git-lab\demo1>

PS C:\git-lab\demo1>

How to remove remote origin in git ?

 Remove git remote origin



PS C:\git-lab\demo1> git remote -v

origin  https://github.com/anuragkumarjoy/terraform-code.git (fetch)

origin  https://github.com/anuragkumarjoy/terraform-code.git (push)

PS C:\git-lab\demo1>

PS C:\git-lab\demo1>


PS C:\git-lab\demo1> git remote remove origin

PS C:\git-lab\demo1> 

PS C:\git-lab\demo1>

PS C:\git-lab\demo1> git remote -v

PS C:\git-lab\demo1> 

PS C:\git-lab\demo1>


Git push Error - fatal: credential-cache unavailable; no unix socket support

PS C:\git-lab\demo1>

PS C:\git-lab\demo1> git push --set-upstream origin master

fatal: credential-cache unavailable; no unix socket support

Everything up-to-date

branch 'master' set up to track 'origin/master'.

PS C:\git-lab\demo1>


PS C:\git-lab\demo1> 

PS C:\git-lab\demo1> git config --global --unset credential.helper

PS C:\git-lab\demo1> 



PS C:\git-lab\demo1> git push --set-upstream origin master

Everything up-to-date

branch 'master' set up to track 'origin/master'.

PS C:\git-lab\demo1>

PS C:\git-lab\demo1>

PS C:\git-lab\demo1>

Thursday, October 19, 2023

How to know Postgresql server uptime ?

 

Login as privileged user to database 


Query :


SELECT pg_postmaster_start_time();



output :


demo1=> SELECT pg_postmaster_start_time();

   pg_postmaster_start_time

-------------------------------

 2023-10-19 08:46:45.432054+00

(1 row)



demo1=>