Skip to content

Commit f5c3154

Browse files
authored
Merge pull request #110 from AryanGodara/add-error
add error to error.json file
2 parents 54e4870 + 21f7d83 commit f5c3154

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

src/data/error.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,36 @@
107107
"title": "fatal: The remote end hung up unexpectedly",
108108
"description": "This error occurs when the size of the repository is huge for the http to transfer",
109109
"solutions": "git config http.postBuffer 524288000"
110+
},
111+
{
112+
"type": "branch",
113+
"title": "error: You have local changes to <branch_name>; cannot switch branches.",
114+
"description": "This error occurs when switching a branch without commiting the changes made to that branch",
115+
"solutions": "[{'git stash':'stash your current changes'},{'git reset --hard HEAD':'if you dont' mind losing those minor changes'},{'git checkout -b <branch_name>':'When switching branches, proceed even if the index or the working tree differs from HEAD. This is used to throw away local changes.'},{'git switch -f <branch-name>':'-f is short for --force, which is an alias for --discard-changes , works for git 2.23'}]"
116+
},
117+
{
118+
"type": "push",
119+
"title": "Not error, but common problem of pushing wrong/unwanted commits to github",
120+
"description": "Uploaded private or wrong data to the github repository, and want to remove it from remote repo",
121+
"solutions": "[{'git reset --mixed HEAD~':'HEAD~1 indicates a commit just before the recent commit pointed by the current branch HEAD.'},{'git reset --mixed <commit-id>' or 'git reset --soft <commit-id>':'move back to a previous commit, upon pushing, previous commits will get removed.'}]"
122+
},
123+
{
124+
"type": "push",
125+
"title": "fatal: remote origin already exists",
126+
"description": "It happens when you attempt to change the repository origin URL after cloning it from GitHub or another remote repository to your local machine.",
127+
"solutions": "['Update the existing remote URL, use the set-url command', 'rename the existing remote, run git rename with the remote']"
128+
},
129+
{
130+
"type": "push",
131+
"title": "fatal: repository not found",
132+
"description": "occurs while cloning or pushing modifications to a repository. The error may indicate that the repository doesn’t exist or was removed. The repository exists, but an access-related difficulty or remote origin difficulty causes this error.",
133+
"solutions": "{'git clone https://mcnz:githubpass@github.com/cameronmcnz/private-github-repo.git':'You did not authenticate, when trying to access a private github repo without authenticating, you get this error. So, log into the repository with your credentials in the Git URL to authenticate}"
134+
},
135+
{
136+
"type": "push/pull/clone",
137+
"title": "ssl certificate problem unable to get local issuer certificate",
138+
"description": "It is a common git error encountered by users when attempting to push, pull, or clone a git repository with Git Bash, a Windows-specific command-line tool.",
139+
"solutions": "{'git -c http.sslVerify=false clone [URL]':'Command to disable SSL certificate validation in git locally. For security considerations, it is not advised to disable SSL certificate validation. However, it is a possible solution to this issue.'}"
110140
}
111141
]
112142
}

0 commit comments

Comments
 (0)