84.8 Git Cleanup
20201103 If things get confusing or go wrong, some salient advice from xkcd:
It does not always need to be that drastic. Things can go wrong when trying to merge upstream changes into your own local working copy before you then want to submit your changes either directly or through a pull request (the latter is recommended).
Git is pretty good at suggesting what to do at different stages of the workflow, so follow those suggestions.
Here’s a few commands to try to get things back into sync when things seem to have gone wrong.
A local repository may retain known branches over time even though they get deleted from the remote repository. Clean that up with:
$ git remote prune origin # Deletes stale references. $ gir fetch --prune origin # Fetch (i.e. resync with origin) and prune.
$ git branch -d -r origin/validator # Delete branch.
Your donation will support ongoing development and give you access to the PDF version of this book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.