Using Git - eliranwong/UniqueBible GitHub Wiki

Prerequisites

Clone with git

Not using SSH keys:

git clone https://github.com/eliranwong/UniqueBible.git

If using SSH keys:

git clone [email protected]:eliranwong/UniqueBible.git

Running UBA

cd UniqueBible
python3 uba.py

Updating to the latest code

git pull

If you have changed a file, git pull won't work until you decide what to do with your changes.

If you need to keep your changes, you can stash your changes by running git stash. Then run git pull again. Then run git stash pop to bring back your changes.

If you don't need to keep your changes, run git reset --hard. Then run git pull.

Set "git pull" as default update option

  1. Select "Config Flags" via menu to open "Config Flags" Window

  2. Enter "git pull" in search field

  3. Check the option "updateWithGitPull"

Reverting to a previous version

Sometimes, the latest code has a bug in it and it will not start the app. Then you can go back to a previous version of the code.

  1. Find the version you want to revert back to

Run git log to look at code history. Copy the commit id you want to revert back to.

Example:

UniqueBible (main) $ git log

commit ae2fc86ccc3abc198cb090758e75d2bfc3275100
Author: Tseng, Oliver
Date:   Sat Apr 24 11:00:30 2021 -0400

Add open in study window option to verse click

commit 9e297c0fdef1daeb955d480c756b95fa5e66e749
Author: Eliran Wong
Date:   Fri Apr 23 18:13:34 2021 +0100

ver 23.91; Fixed tagging multiple Strong's numbers in simple reading mode.

commit 845e13b983aa5edb3067284fd1550742a31f774f
Merge: 9415166 02d8fb9
Author: Eliran Wong
Date:   Fri Apr 23 18:02:45 2021 +0100

Merge pull request #391 from otseng/main

Fix second Strongs

Copy 845e13b983aa5edb3067284fd1550742a31f774f to go back to the point where "Fix second Strongs" was made.

  1. Checkout the code

Run git checkout <commit id>

Example:

> git checkout 845e13b983aa5edb3067284fd1550742a31f774f

Note: checking out '845e13b983aa5edb3067284fd1550742a31f774f'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

Don't worry about the 'detached HEAD' message. It just means you're not using the latest code.

  1. To go back to the latest code, run get checkout main

More info on git

Git docs

⚠️ **GitHub.com Fallback** ⚠️