Skip to content

Instantly share code, notes, and snippets.

@akoserwal
Last active February 7, 2019 21:27
Show Gist options
  • Save akoserwal/f3b55ec5a516881f311a0e5da84c0821 to your computer and use it in GitHub Desktop.
Save akoserwal/f3b55ec5a516881f311a0e5da84c0821 to your computer and use it in GitHub Desktop.
Ch1-remotes

Git-in-Real: Lesson 1

Remotes: Adding a remote location to where you can publish your repository. You can add mutiple remote location.

To Check remote locations

git remote -v

Ouput:

origin  https://github.com/akoserwal/git-in-real.git (fetch)
origin  https://github.com/akoserwal/git-in-real.git (push)

Add a remote location

Name of remote location can be any thing based on your use-case & ease of use.

git remote add ch1-remote-origin https://github.com/akoserwal/git-in-real.git 

Verify

git remote -v

Create a new branch

git checkout -b ch1-remotes-final

Push your local repository branch to remote location

git push ch1-remote-origin ch1-remotes-final

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment