Push git cloned repository to your own on GitHub

Sung M. Kim on October 01, 2017

** UPDATE: April 21, 2019 ** Both Eugene Karataev & Noah Pederson provided a better way than what's in this post. Check'em out below. ... [Read Full]
markdown guide
 

It's not necessary to remove old origin and create a new one. You can just change the existing origin url:
git remote set-url origin NEW_URL

 

👆
Wow 😲, Eugene. Thanks for the set-url option.

To borrow from SQL, my posts is using "DELETE" then "INSERT"

while your command does an "UPDATE".

Much simpler.

 

Instead of creating a new repo, why not just create a fork then set the remote the same way? The git history should be the same, and GitHub will still track it as a forked repository

 

That is a better option than what the post showed 👍

I've only learned of it recently when someone forked my repo and renamed it to create a useful library out of it.

edewit / react-use-sessionstorage

⚓ React hook for using local storage

react-use-sessionstorage

Fork of github.com/dance2die/react-use-loc... but then uses session storage instead of local storage.

How to use it

import React from 'react'
import ReactDOM from 'react-dom'
import useLocalStorage from 'react-use-sessionstorage'
import './styles.css'
function App() {
  const [item, setItem] = useSessionStorage('name', 'Initial Value');

  return (
    <div className="App">
      <h1>Set Name to store in Local Storage</h1>
      <div>
        <label>
          Name:{' '}
          <input
            type="text"
            placeholder="Enter your name"
            value={item}
            onChange={e => setItem(e.target.value)}
          />
        </label>
      </div>
    </div>
  );
}

const rootElement =
code of conduct - report abuse