Skip to content

Instantly share code, notes, and snippets.

@Elliria
Last active July 25, 2025 06:48
Show Gist options
  • Save Elliria/bc2dddd052401c48c5666fe62fc9c199 to your computer and use it in GitHub Desktop.
Save Elliria/bc2dddd052401c48c5666fe62fc9c199 to your computer and use it in GitHub Desktop.

Manage The Wiki Locally

Clone the AutoKey wiki:

  1. Open the directory you'd like to put the clone's directory into in a terminal window.
  2. Clone the wiki, which will create the autokey.wiki directory inside of the current directory:
    git clone https://github.com/autokey/autokey.wiki.git

Update the clone and check the wiki for changes:

  1. Open the clone's directory (the autokey.wiki directory) in a terminal window.
  2. Download fresh data from the remote wiki:
    git fetch
  3. Check if the clone is behind or ahead of the remote wiki:
    git status
  4. If it's behind, examine its log to see the entire history and figure out what has changed:
     git log --all --graph --pretty=format:'%C(auto)%h%C(#ffff00)%d%Creset - %C(cyan)(%cr)%Creset - %C(#ff00ff)%s %C(green)[%cn]'
  5. Update the clone with the latest changes from the remote wiki if it's behind:
    git pull

Revert a commit:

  1. Open the clone's directory (the autokey.wiki directory) in a terminal window.
  2. Update the clone with any changes from the remote wiki:
    git pull
  3. Do a git log to see all of the commits (with the most recent ones listed first):
    git log --oneline
  4. Copy the commit hash of the unwanted commit.
  5. Pick one:
    • Revert the most recent commit:
      git revert HEAD
    • Revert the unwanted commit by using its commit hash:
      1. Copy the commit hash of the unwanted commit.
      2. Use the commit hash you copied in place of commithash in this command to revert the specified commit:
        git revert commithash
  6. Update the remote wiki with your change:
    git push

Notes on reverting a commit:

  • This can be useful to undo an unwanted change or to restore a file that got accidentally or intentionally deleted, like when an inexperienced user deletes a page from the wiki.
  • You can revert more than one commit, but you'd want to revert them one at a time starting with the most recent one first.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment