Sourcetree Tips and Hints - PerseusDL/tei-conversion-tools GitHub Wiki
Although not required, many collaborators use Sourcetree to manage the GitHub workflow.
Here are some setup tips and hints.
-
Install Sourcetree. https://www.sourcetreeapp.com and Skip any account linking during installation.
-
Once installed, go to Preferences -> Accounts -> Add.
Enter your GitHub user name and email address and choose Host: GitHub, Auth Type: Basic, Protocol: HTTPS
-
Choose File -> New -> Clone from URL and use the source URL found on the repo page.
The program will auto fill Destination Path and Name, so verify that those are what you want. In our example, we have created a Development directory in the user folder.
-
Once the clone is complete, Sourcetree will look something like this:
If you check the Settings (upper right corner of window), you may verify that you are pointing to a remote repo: Settings -> Remotes
-
To work on a file, you will want to create a branch. In this example, let's fix a typographical error. So I create a branch named, "typo-fixes". My sample typo is the word θένα in Euripides, Iphigenia in Aulis 427. (This should read θέαν). I open the work in question (tlg0006.tlg018.perseus-grcX) and make the edit in a text editing application.
-
Now in Sourcetree, the File status on the left hand side bar has a "1" next to it, reflecting the edits I just made. Click on File status to see this window:
Because this is one small change, Sourcetree shows us the before and after of the edits. Now we can commit the change. Sourcetree will ask you the details you want to associate with your commit. In this case, I use my existing GitHub handle and address.
Note: I have created an issue for this typo, following the best practice recommended here: https://github.com/PerseusDL/canonical-greekLit/wiki/Submit-a-correction-using-GitHub-pull-requests
We want to note the branch, and file name(s) whenever possible, summarize the edit, and refer to the issue number in our commit message, for example:
(typo-fixes) tlg0006.tlg018.perseus-grc1.xml typo on line 427 #488
Check the box that reads "Push changes immediately..." and click Commit.
-
When you return to the History screen, the commit will be visible.
You will also see it noted on the repo page:
and if you click the "Compare and Pull Request" button, you will see a screen like this: