Uncategorized

How to Get Current URL in JavaScript (& Useful Examples)

To get the current URL of the page you are visiting using JavaScript, access the window.location.href property: Alternatively, you can access the current URL via document.URL property. However, it has some shortcomings that I’ll explain in a bit. Let’s take a closer look at the window.location object. It has useful properties other than the href

How to Get Current URL in JavaScript (& Useful Examples) Read More »

Git How to Change Remote Origin (with Examples)

To change your Git remote URL, use the git remote set-url command by specifying: Here’s what the command looks like: Typically running the above command looks like this: Example Let’s change the remote URL of an actual GitHub repo to demonstrate how the process works. I have a (private) Github repo at https://github.com/artturijalli/exampleProject.git which I’ve

Git How to Change Remote Origin (with Examples) Read More »

Scroll to Top