I followed these steps to delete Github Desktop and just use VSCode for pushing to different repos.
In VSCode, set global options. I set my work email since most of my repos are set to go to their local Gitlab instance
1 2 3
git config --global user.email "firstname.lastname@example.org" git config --global user.name "Firstname Lastname" git config --global core.autocrlf true
- Uninstall any references to external programs
- Uninstall Git Desktop (Run => appwiz.cpl => Remove Github Desktop)
- Uninstall Credentials Manager:
cd "C:\Program Files\Git\mingw64\libexec\git-core"
- Reset credentials helper to use wincred
git config --global credential.helper wincred
Used VS Code to Push some changes and re-input credentials. Usually something along the lines of:
1 2 3 4 5 6 7
git remote add origin https://github.com/gerryw1389/gerryw1389.github.io git push --set-upstream origin master git add --all git commit -m 'example' git pull git branch --set-upstream-to=origin/master git push
Repos: Since I have 4 different repos all in different folders, what I did was go to each repo and:
git config -land look for the correct origin.
If it is wrong, type
git remote rm originand
git remote add origin https://path/to/repositorythen confirm
git remote get-url --all origin
git config --local user.name "Gerry Williams"and
git config --local user.email "email@example.com". This is so that my personal email can be attached to Github repos while other repos will still get my work email by default.
- Lastly for each repo I would create a test file and do a push and look for/resolve any errors. For example:
1 2 3 4
touch myfile.txt git add . git commit -m 'testing vscode' git push origin
- Sometime I would get
error: the current branch master has no upstream branch
git push --set-upstream origin master
You might then get
fatal: refusing to merge unrelated histories
git push origin master --force