-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit-remoe.txt
42 lines (27 loc) · 1.22 KB
/
git-remoe.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
Removing a remote
Use the git remote rm command to remove a remote URL from your repository.
The git remote rm command takes one argument:
A remote name, for example, destination
Example
These examples assume you're cloning using HTTPS, which is recommended.
$ git remote -v
# View current remotes
> origin https://github.com/OWNER/REPOSITORY.git (fetch)
> origin https://github.com/OWNER/REPOSITORY.git (push)
> destination https://github.com/FORKER/REPOSITORY.git (fetch)
> destination https://github.com/FORKER/REPOSITORY.git (push)
$ git remote rm destination
# Remove remote
$ git remote -v
# Verify it's gone
> origin https://github.com/OWNER/REPOSITORY.git (fetch)
> origin https://github.com/OWNER/REPOSITORY.git (push)
Note: git remote rm does not delete the remote repository from the server. It simply removes the remote and its references from your local repository.
Troubleshooting
You may encounter these errors when trying to remove a remote.
Could not remove config section 'remote.[name]'
This error means that the remote you tried to delete doesn't exist:
$ git remote rm sofake
> error: Could not remove config section 'remote.sofake'
//POSTGRESql HEROKU
heroku addons:create heroku-postgresql:hobby-dev