Git Remote
// test mode of communication https or ssh
git remote -v
// if https you will get
origin https://git.gitbook.com/hemantajax/css-flexbox.git (fetch)
origin https://git.gitbook.com/hemantajax/css-flexbox.git (push)
// if ssh
origin https://git.gitbook.com/hemantajax/css-flexbox.git (fetch)
origin https://git.gitbook.com/hemantajax/css-flexbox.git (push)
// To change mode of communication https -> ssh
git remote set-url origin git@github.com:hs950559/bootstrap4-snippet.git
( copied 'git@github.com:hs950559/bootstrap4-snippet.git' from github)
// To change mode of communication ssh -> https
git remote set-url origin https://github.com/hs950559/bootstrap4-snippet.git
( copied 'https://github.com/hs950559/bootstrap4-snippet.git' from github)
Adding github to local repository
git remote add origin https://github.com/hs950559/git-step-by-step.git
// OR
git remote add origin git@github.com:hs950559/git-step-by-step.git
OR start with fresh git clone
git clone https://github.com/hs950559/git-step-by-step.git
Last updated
Was this helpful?