Skip to content

Practice: remote repository management #4

Description

@yeonns

Practice: remote repository management

  1. Check your remote repository list with below command
$ git remote -v
origin  git@github.com:YOUR_ID/git-practice.git (fetch)
origin  git@github.com:YOUR_ID/git-practice.git (push)
  1. Rename remote repsoitory name from origin to YOUR_ID
# result should be like below!
$ git remote -v
YOUR_ID  git@github.com:YOUR_ID/git-practice.git (fetch)
YOUR_ID  git@github.com:YOUR_ID/git-practice.git (push)
  1. Add remote repository named origin - yeonns/git-practice
# result should be like below!
$ git remote -v
origin  git@github.com:yeonns/git-practice.git (fetch)
origin  git@github.com:yeonns/git-practice.git (push)
YOUR_ID  git@github.com:YOUR_ID/git-practice.git (fetch)
YOUR_ID  git@github.com:YOUR_ID/git-practice.git (push)
  1. Fetch origin
  2. Show your result with comments!
$ git remote -v
origin  git@github.com:yeonns/git-practice.git (fetch)
origin  git@github.com:yeonns/git-practice.git (push)
YOUR_ID  git@github.com:YOUR_ID/git-practice.git (fetch)
YOUR_ID  git@github.com:YOUR_ID/git-practice.git (push)
$ git remote show origin
* remote origin
  Fetch URL: git@github.com:yeonns/git-practice.git
  Push  URL: git@github.com:yeonns/git-practice.git
  HEAD branch: master
  Remote branches:
    feat/about-me            tracked
    master                   tracked
✔️ Hints
# rename remote repository
$ git remote rename <OLD_NAME> <NEW_NAME>
# add remote repository
$ git remote add <REPOSITORY_NAME> <REPOSITORY_ADDRESS>
# fetch remote repository
$ git fetch <REPOSITORY_NAME>

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions