> For the complete documentation index, see [llms.txt](https://hemantajax-2.gitbook.io/git-step-by-step/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hemantajax-2.gitbook.io/git-step-by-step/git-remote.md).

# 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
```
