- Open the directory you'd like to put the clone's directory into in a terminal window.
- Clone the wiki, which will create the autokey.wiki directory inside of the current directory:
git clone https://github.com/autokey/autokey.wiki.git
- Open the clone's directory (the autokey.wiki directory) in a terminal window.
- Download fresh data from the remote wiki:
git fetch
- Check if the clone is behind or ahead of the remote wiki:
git status
- 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]'
- Update the clone with the latest changes from the remote wiki if it's behind:
git pull
- Open the clone's directory (the autokey.wiki directory) in a terminal window.
- Update the clone with any changes from the remote wiki:
git pull
- Do a git log to see all of the commits (with the most recent ones listed first):
git log --oneline
- Copy the commit hash of the unwanted commit.
- Pick one:
- Revert the most recent commit:
git revert HEAD
- Revert the unwanted commit by using its commit hash:
- Copy the commit hash of the unwanted commit.
- Use the commit hash you copied in place of commithash in this command to revert the specified commit:
git revert commithash
- Revert the most recent commit:
- Update the remote wiki with your change:
git push
- 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.