- 01Getting Started
- 02What Is Git? Understanding Version Control
- 03Checking the Current State with git status
- 04Understanding the "Staging Area"
- 05Recording Changes with git commit
- 06Viewing History with git log
- 07Viewing Changes with git diff
- 08What Is a Branch?
- 09Switching Branches with git checkout
- 10Merging Branches with git merge
- 11Remote Repositories and git remote
- 12Sending Changes with git push
- 13Getting Code with git pull and git clone
- 14Shelving Work Temporarily with git stash
- 15Marking Releases with git tag
- 16Unstaging with git reset
- 17Untracking a File with git rm
- 18Ignoring Files with .gitignore
- 19Deleting a Branch with git branch -d
- 20Setting Your Name with git config
- 21Viewing the Latest Commit with git show
- 22Fetching Remote Info Only with git fetch
- 23Viewing History Compactly with git log --oneline
- 24Finding Who Changed a File with git blame
- 25Undoing a Commit with git revert
- 26Fixing the Last Commit with git commit --amend
- 27Viewing the Staged Diff with git diff --staged
- 28Visualizing History with git log --graph
- 29Switching Branches with git switch (the Newer Syntax)
- 30Renaming a Branch with git branch -m
- 31Filtering History by Author with git log --author
- 32Deleting a Stash with git stash drop
- 33Deleting a Tag with git tag -d
- 34Listing Remotes with git remote -v
- 35Replaying Your Branch with git rebase
- 36Viewing Changed Files Alongside History with git log --stat
- 37Staging and Committing Together with git commit -a
- 38Discarding File Changes with git checkout --
- 39Picking Just One Commit with git cherry-pick
- 40Recording a Rename with git mv
- 41Checking HEAD's Movement History with git reflog
- 42Applying a Stash Without Removing It with git stash apply
- 43Creating an Annotated Tag with git tag -a
- 44Filtering History by Date with git log --since
- 45Viewing the Actual Changes with git log -p
- 46Getting Just the Current Branch Name with git branch --show-current
- 47Creating an Empty Commit with git commit --allow-empty
- 48Searching Commit Messages with git log --grep
- 49Removing a Remote with git remote remove
- 50Understanding the Danger of git push --force
- 51Counting Commits per Author with git shortlog
- 52Returning to Your Previous Branch with git switch -
- 53Viewing One File's Diff with git diff <file>
- 54Listing Your Settings with git config --list
- 55Checking Status Compactly with git status -s
- 56Adding Only Changes with git commit --amend --no-edit
- 57Mastering the git commit -am Shorthand
- 58Adding a Message to a Stash with git stash push -m
- 59Searching Tags by Pattern with git tag -l
Removing a Remote with git remote remove
This lesson covers removing a registered remote repository with git remote remove. It's for anyone searching "git remote remove usage."
git remote remove deletes the information for a registered remote repository. Use it when a remote's URL changes, or you want to clean up a connection you no longer need.
In Try It, run git remote remove origin. The remote repository info registered under the name origin is deleted.
A common early mistake is thinking this deletes the remote itself (like the repository on GitHub) — it doesn't; it only removes the "connection info" registered on your own computer, and has no effect on the remote side's data. In real teams, this command is used when migrating a repository or changing its URL, to remove the old connection and register the new one in its place.
🧑💻 You can type this command into the Git pseudo terminal to try it yourself (this page itself has no interactive terminal).
