Cheatsheet: Resolving Conflicts in a Git Repository

When working collaboratively in a Git repository, after committing some new changes and trying to push with: git add [file] git commit -m "[your message]" git push You might see the message: failed to push some refs to [url]. Updates were rejected because the remote contains work that you do not have locally Option 1: Resolve conflicts locally Fetch the latest changes from the remote repository: git fetch origin Merge the remote version of the repository with the local version (assuming you are in the main branch):...

November 19, 2023 · 2 min · Hamish Gibbs

Removing large files from a Logseq Git repository

I use Git to track changes to my Logseq Graph and keep a remote version of my repository on GitHub (as a backup). Logseq can automatically commit changes to your files at a given a time interval and this gives a great record of what you are doing all day, with data that is relatively easy to analyze (if you ever wanted to). Tracking Logseq with Git works very well, until it doesn’t!...

November 21, 2023 · 4 min · Hamish Gibbs