├── GitHub-trainings ├── Intro-Git-GitHub-Observer │ ├── jupyter-repo-setup │ │ └── repo-content-files │ │ │ ├── commit1 │ │ │ └── country-facts.do │ │ │ ├── commit2 │ │ │ └── country-facts.do │ │ │ ├── commit3 │ │ │ └── country-facts.do │ │ │ ├── commit4 │ │ │ └── country-facts.do │ │ │ ├── commit5 │ │ │ └── country-facts.do │ │ │ ├── no.gitignore │ │ │ ├── commit6 │ │ │ └── country-facts.do │ │ │ ├── commit7 │ │ │ └── country-facts.do │ │ │ ├── commit8 │ │ │ └── country-facts.do │ │ │ ├── commit9 │ │ │ └── country-facts.do │ │ │ ├── commit-fix-dehli │ │ │ └── country-facts.do │ │ │ └── README.md │ ├── latex-slides │ │ └── img │ │ │ └── reference-code-line-issue.png │ └── README.md ├── Common-Resources │ ├── img │ │ ├── Footer.png │ │ ├── Header.png │ │ ├── branches.png │ │ ├── finaldoc_cartoon.png │ │ ├── which-is-final-folder.png │ │ ├── dropbox_versioncontrol.png │ │ ├── git_github_gitclient_git.png │ │ ├── git_github_gitclient_github.png │ │ └── git_github_gitclient_gitclient.png │ ├── README.md │ ├── slides │ │ ├── GitHub-Commit-URL.tex │ │ ├── GitHub-Links.tex │ │ ├── Git-GitHub-GitClient.tex │ │ └── GitHub-Roles.tex │ ├── github_tools.py │ └── token │ │ └── README.md ├── git-github-ttl-intro │ ├── img │ │ ├── blame.png │ │ ├── clone.png │ │ ├── gitflow.png │ │ ├── issue.png │ │ ├── label.png │ │ ├── r-code.png │ │ ├── git-logo.png │ │ ├── cli-client.png │ │ ├── commit-1file.png │ │ ├── dime-account.png │ │ ├── git-email1.png │ │ ├── git-email2.png │ │ ├── git-email3.png │ │ ├── graph-diff.png │ │ ├── gui-client.png │ │ ├── binary-formats.png │ │ ├── commit-2files.png │ │ ├── commit-compare.png │ │ ├── curate-commit.png │ │ ├── ignore-example.png │ │ ├── finaldoc_cartoon.png │ │ ├── network-graph-1.png │ │ ├── network-graph-2.png │ │ ├── network-graph-gh.png │ │ └── review-features.png │ └── _extensions │ │ └── dime │ │ ├── favicon.html │ │ ├── logos │ │ ├── DIME_BLACK.png │ │ ├── DIME_COLOR.png │ │ ├── DIME_WHITE.png │ │ ├── WB-WBG-horizontal-RGB.png │ │ ├── WB-WBG-horizontal-black.png │ │ ├── WB-WBG-horizontal-white.png │ │ ├── WB-WBG-horizontal-grayscale.png │ │ ├── WB-DEC-Impact-horizontal-RGB-high.png │ │ ├── WB-DEC-Impact-horizontal-black-high.png │ │ └── WB-DEC-Impact-horizontal-white-high.png │ │ ├── _extension.yml │ │ ├── about.qmd │ │ ├── setup_dime_palettes.R │ │ ├── dime.scss │ │ ├── WBlogo.svg │ │ └── setup_ggplot2_dime.R ├── github-pr-training │ ├── latex-slides │ │ └── img │ │ │ ├── qa.png │ │ │ ├── git-icon.png │ │ │ ├── review-1.png │ │ │ ├── create-pr-0.png │ │ │ ├── create-pr-1.png │ │ │ ├── github-icon.png │ │ │ ├── pr-branch.png │ │ │ ├── pr-comment.png │ │ │ ├── new-branch-1.png │ │ │ ├── new-branch-2.png │ │ │ ├── new-branch-3.png │ │ │ ├── organization.png │ │ │ ├── pr-highlight.png │ │ │ ├── suggestion-1.png │ │ │ ├── suggestion-2.png │ │ │ ├── training-repo.png │ │ │ ├── line-comment-1.png │ │ │ ├── line-comment-2.png │ │ │ ├── team-challenge.png │ │ │ ├── conflict-img-setup.png │ │ │ ├── branch-pr-merge-cycle.png │ │ │ ├── conflict-img-conflict.png │ │ │ ├── conversation-summary.png │ │ │ ├── dime-gitflow-network.png │ │ │ ├── review-suggestion-1.png │ │ │ ├── conflict-img-cant-merge.png │ │ │ ├── conflict-img-commits-1.png │ │ │ ├── conflict-img-commits-2.png │ │ │ ├── conflict-img-resolve-1.png │ │ │ ├── conflict-img-resolve-2.png │ │ │ ├── conflict-network-setup.png │ │ │ ├── dime-gitflow-network-0.png │ │ │ ├── branch-pr-merge-cycle-S1a.png │ │ │ ├── branch-pr-merge-cycle-S2.png │ │ │ ├── branch-pr-merge-cycle-S2a.png │ │ │ ├── branch-pr-merge-cycle-S2b.png │ │ │ ├── branch-pr-merge-cycle-S2c.png │ │ │ ├── branch-pr-merge-cycle-S3.png │ │ │ ├── branch-pr-merge-cycle-S3a.png │ │ │ ├── branch-pr-merge-cycle-S3b.png │ │ │ ├── conflict-network-1stmerge.png │ │ │ ├── conflict-network-commits.png │ │ │ ├── conflict-network-conflict.png │ │ │ ├── dime-gitflow-network-1-0.png │ │ │ ├── dime-gitflow-network-1-1.png │ │ │ ├── dime-gitflow-network-1-2.png │ │ │ ├── dime-gitflow-network-1-3.png │ │ │ ├── dime-gitflow-network-2-1.png │ │ │ ├── dime-gitflow-network-2-2.png │ │ │ ├── dime-gitflow-network-2-3.png │ │ │ ├── dime-gitflow-network-2-4.png │ │ │ ├── dime-gitflow-network-2-5.png │ │ │ ├── dime-gitflow-network-2-6.png │ │ │ ├── dime-gitflow-network-names.png │ │ │ ├── full-branch-pr-merge-cycle.png │ │ │ ├── nested-branch-pr-merge-cycle.png │ │ │ └── dime-gitflow-network-workdirectly.png │ └── jupyter-repo-setup │ │ └── repo-content-files │ │ ├── README.md │ │ ├── edits │ │ ├── backstreets-back.txt │ │ ├── november-rain3.txt │ │ ├── november-rain2.txt │ │ ├── shines.txt │ │ ├── shines-bronze.txt │ │ ├── shines-silver.txt │ │ └── november-rain1.txt │ │ ├── lyrics │ │ ├── pop │ │ │ ├── backstreets-back.txt │ │ │ └── mamma-mia.txt │ │ └── rock │ │ │ ├── stairway-to-heaven.txt │ │ │ └── november-rain.txt │ │ └── no.gitignore ├── Intro-Git-GitHub-Contributor │ ├── latex-slides │ │ └── img │ │ │ ├── desktop_changes.png │ │ │ ├── desktop_commit.png │ │ │ └── clonedownload_button.png │ ├── jupyter-repo-setup │ │ ├── repo-content-files │ │ │ ├── lyrics │ │ │ │ ├── pop │ │ │ │ │ ├── backstreets-back.txt │ │ │ │ │ ├── mamma-mia.txt │ │ │ │ │ └── dont-stop-me-now.txt │ │ │ │ └── rock │ │ │ │ │ ├── stairway-to-heaven.txt │ │ │ │ │ └── november-rain.txt │ │ │ ├── no.gitignore │ │ │ └── README.md │ │ └── Setup TrainingRepo.ipynb │ ├── README.md │ └── Training-Preperations-Contributor.md ├── github-team-maintainer-training │ ├── latex-slides │ │ ├── img │ │ │ ├── teams-workflow.png │ │ │ ├── which-repos-in-team.PNG │ │ │ ├── which-teams-am-i-in.PNG │ │ │ ├── which-teams-in-repo.PNG │ │ │ └── who-is-team-maintainer.PNG │ │ └── github-team-maintainer-training.tex │ └── README.md ├── README.md └── Git-Better │ └── latex-slides │ └── Git-Better.tex ├── GitHub-resources ├── DIME-GitHub-Guides │ ├── img │ │ ├── clone-not-found.png │ │ ├── clone-new-location.png │ │ └── clone-onedrive-status.png │ ├── github-account-name.md │ ├── github-childteam-access.md │ ├── Creating-GitHub-account.md │ └── clone-location.md ├── DIME-GitHub-Templates │ ├── placeholder-README.md │ ├── gitignore_template.txt │ └── README.md └── DIME-GitHub-Roles │ └── DIME-GitHub-roles.md ├── LICENSE ├── README.md └── .gitignore /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/commit1/country-facts.do: -------------------------------------------------------------------------------- 1 | # Country Facts 2 | 3 | -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/img/Footer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Common-Resources/img/Footer.png -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/img/Header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Common-Resources/img/Header.png -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/img/branches.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Common-Resources/img/branches.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/blame.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/blame.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/clone.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/clone.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/gitflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/gitflow.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/issue.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/label.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/label.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/r-code.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/r-code.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/git-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/git-logo.png -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/img/finaldoc_cartoon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Common-Resources/img/finaldoc_cartoon.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/cli-client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/cli-client.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/commit-1file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/commit-1file.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/dime-account.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/dime-account.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/git-email1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/git-email1.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/git-email2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/git-email2.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/git-email3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/git-email3.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/graph-diff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/graph-diff.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/gui-client.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/gui-client.png -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Guides/img/clone-not-found.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-resources/DIME-GitHub-Guides/img/clone-not-found.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/favicon.html: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/binary-formats.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/binary-formats.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/commit-2files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/commit-2files.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/commit-compare.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/commit-compare.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/curate-commit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/curate-commit.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/ignore-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/ignore-example.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/qa.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/qa.png -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Guides/img/clone-new-location.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-resources/DIME-GitHub-Guides/img/clone-new-location.png -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/img/which-is-final-folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Common-Resources/img/which-is-final-folder.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/finaldoc_cartoon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/finaldoc_cartoon.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/network-graph-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/network-graph-1.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/network-graph-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/network-graph-2.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/network-graph-gh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/network-graph-gh.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/img/review-features.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/img/review-features.png -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Guides/img/clone-onedrive-status.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-resources/DIME-GitHub-Guides/img/clone-onedrive-status.png -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/img/dropbox_versioncontrol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Common-Resources/img/dropbox_versioncontrol.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/git-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/git-icon.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/review-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/review-1.png -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/img/git_github_gitclient_git.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Common-Resources/img/git_github_gitclient_git.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/create-pr-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/create-pr-0.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/create-pr-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/create-pr-1.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/github-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/github-icon.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/pr-branch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/pr-branch.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/pr-comment.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/pr-comment.png -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/img/git_github_gitclient_github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Common-Resources/img/git_github_gitclient_github.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/new-branch-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/new-branch-1.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/new-branch-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/new-branch-2.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/new-branch-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/new-branch-3.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/organization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/organization.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/pr-highlight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/pr-highlight.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/suggestion-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/suggestion-1.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/suggestion-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/suggestion-2.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/training-repo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/training-repo.png -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/img/git_github_gitclient_gitclient.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Common-Resources/img/git_github_gitclient_gitclient.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/line-comment-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/line-comment-1.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/line-comment-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/line-comment-2.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/team-challenge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/team-challenge.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/DIME_BLACK.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/DIME_BLACK.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/DIME_COLOR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/DIME_COLOR.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/DIME_WHITE.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/DIME_WHITE.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-setup.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-conflict.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-conflict.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conversation-summary.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conversation-summary.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/review-suggestion-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/review-suggestion-1.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-cant-merge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-cant-merge.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-commits-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-commits-1.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-commits-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-commits-2.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-resolve-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-resolve-1.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-resolve-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-img-resolve-2.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-network-setup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-network-setup.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-0.png -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/README.md: -------------------------------------------------------------------------------- 1 | # Common Resources 2 | 3 | Resources needed to the LaTeX code that generates the training slides, or the jupyter notebooks that generates the training repos are found in this folder. 4 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/latex-slides/img/desktop_changes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Intro-Git-GitHub-Contributor/latex-slides/img/desktop_changes.png -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/latex-slides/img/desktop_commit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Intro-Git-GitHub-Contributor/latex-slides/img/desktop_commit.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S1a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S1a.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S2.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S2a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S2a.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S2b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S2b.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S2c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S2c.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S3.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S3a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S3a.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S3b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/branch-pr-merge-cycle-S3b.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-network-1stmerge.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-network-1stmerge.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-network-commits.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-network-commits.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/conflict-network-conflict.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/conflict-network-conflict.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-1-0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-1-0.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-1-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-1-1.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-1-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-1-2.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-1-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-1-3.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-1.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-2.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-3.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-4.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-5.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-2-6.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-names.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-names.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/full-branch-pr-merge-cycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/full-branch-pr-merge-cycle.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/nested-branch-pr-merge-cycle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/nested-branch-pr-merge-cycle.png -------------------------------------------------------------------------------- /GitHub-trainings/github-team-maintainer-training/latex-slides/img/teams-workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-team-maintainer-training/latex-slides/img/teams-workflow.png -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/latex-slides/img/clonedownload_button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Intro-Git-GitHub-Contributor/latex-slides/img/clonedownload_button.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-WBG-horizontal-RGB.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-WBG-horizontal-RGB.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-WBG-horizontal-black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-WBG-horizontal-black.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-WBG-horizontal-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-WBG-horizontal-white.png -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/latex-slides/img/reference-code-line-issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/Intro-Git-GitHub-Observer/latex-slides/img/reference-code-line-issue.png -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-workdirectly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-pr-training/latex-slides/img/dime-gitflow-network-workdirectly.png -------------------------------------------------------------------------------- /GitHub-trainings/github-team-maintainer-training/latex-slides/img/which-repos-in-team.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-team-maintainer-training/latex-slides/img/which-repos-in-team.PNG -------------------------------------------------------------------------------- /GitHub-trainings/github-team-maintainer-training/latex-slides/img/which-teams-am-i-in.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-team-maintainer-training/latex-slides/img/which-teams-am-i-in.PNG -------------------------------------------------------------------------------- /GitHub-trainings/github-team-maintainer-training/latex-slides/img/which-teams-in-repo.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-team-maintainer-training/latex-slides/img/which-teams-in-repo.PNG -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-WBG-horizontal-grayscale.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-WBG-horizontal-grayscale.png -------------------------------------------------------------------------------- /GitHub-trainings/github-team-maintainer-training/latex-slides/img/who-is-team-maintainer.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/github-team-maintainer-training/latex-slides/img/who-is-team-maintainer.PNG -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-DEC-Impact-horizontal-RGB-high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-DEC-Impact-horizontal-RGB-high.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-DEC-Impact-horizontal-black-high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-DEC-Impact-horizontal-black-high.png -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-DEC-Impact-horizontal-white-high.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/worldbank/dime-github-trainings/HEAD/GitHub-trainings/git-github-ttl-intro/_extensions/dime/logos/WB-DEC-Impact-horizontal-white-high.png -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/slides/GitHub-Commit-URL.tex: -------------------------------------------------------------------------------- 1 | \begin{frame}{LaTeX/Git Version control} 2 | Most recent commit at the point of compiling this \LaTeX{} Beamer presentation: 3 | 4 | \commiturl 5 | 6 | \vspace{1cm} 7 | 8 | \small For instructions on how to include URLs to most recent commit used to generate document in Git, see: \url{https://gist.github.com/kbjarkefur/88820e5a5365b3f707b6b20aee57cf8a} 9 | 10 | \end{frame} 11 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/README.md: -------------------------------------------------------------------------------- 1 | # DIME Pull request training 2 | 3 | This repository was created for a training session of [DIME Analytics](https://www.worldbank.org/en/research/dime/data-and-analytics) *Pull request training*. You can read more about DIME Analytics Git and GitHub trainings [here](https://github.com/worldbank/dime-github-trainings). 4 | 5 | ## Contact 6 | 7 | If you have any questions about this training, please email us at dimeanalytics@worldbank.org 8 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/commit2/country-facts.do: -------------------------------------------------------------------------------- 1 | ####################################### 2 | Country Facts 3 | ####################################### 4 | 5 | ####################################### 6 | ## Brazil 7 | 8 | 9 | ####################################### 10 | ## India 11 | 12 | 13 | ####################################### 14 | ## Nepal 15 | 16 | 17 | ####################################### 18 | ## Spain 19 | 20 | 21 | ####################################### 22 | ## Sweden 23 | 24 | 25 | ####################################### 26 | ## USA 27 | 28 | -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/slides/GitHub-Links.tex: -------------------------------------------------------------------------------- 1 | \begin{frame}{Useful links} 2 | \begin{itemize} 3 | \item All DIME Analytics GitHub trainings: \trainingURL{https://osf.io/e54gy/} 4 | \item Other DIME Analytics GitHub resources: \trainingURL{https://github.com/worldbank/dime-github-trainings}. For example: 5 | \begin{itemize} 6 | \item DIME Analytics GitHub Templates (for example .gitignore): \trainingURL{https://github.com/worldbank/dime-github-trainings/tree/master/GitHub-resources/DIME-GitHub-Templates} 7 | \end{itemize} 8 | \item Markdown cheat sheet (how to format text on GitHub.com): \trainingURL{https://www.markdownguide.org/cheat-sheet/} 9 | \end{itemize} 10 | \end{frame} 11 | -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/slides/Git-GitHub-GitClient.tex: -------------------------------------------------------------------------------- 1 | \begin{frame} 2 | \frametitle{What is Git, GitHub and GitHub Desktop?} 3 | \begin{figure} 4 | \centering 5 | \includegraphics[width=0.7\linewidth]{../../Common-Resources/img/git_github_gitclient_git} 6 | \label{fig:gitgithubgitclient_git} 7 | \end{figure} 8 | \end{frame} 9 | 10 | \begin{frame} 11 | \frametitle{What is Git, GitHub and GitHub Desktop?} 12 | \begin{figure} 13 | \centering 14 | \includegraphics[width=0.7\linewidth]{../../Common-Resources/img/git_github_gitclient_github} 15 | \label{fig:gitgithubgitclient_github} 16 | \end{figure} 17 | \end{frame} 18 | 19 | \begin{frame} 20 | \frametitle{What is Git, GitHub and GitHub Desktop?} 21 | \begin{figure} 22 | \centering 23 | \includegraphics[width=0.7\linewidth]{../../Common-Resources/img/git_github_gitclient_gitclient} 24 | \label{fig:gitgithubgitclient_gitclient} 25 | \end{figure} 26 | \end{frame} -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/_extension.yml: -------------------------------------------------------------------------------- 1 | title: DIME Presentation Template 2 | author: Bernhard Bieri 3 | version: 0.0.1 4 | quarto-required: ">=1.3.361" 5 | contributes: 6 | formats: 7 | revealjs: 8 | footer: | 9 | "[DIME theme](https://github.com/dime-worldbank) for 10 | [Quarto Presentations](https://quarto.org/docs/presentations/revealjs/index.html). 11 | Code available on [GitHub](https://github.com/dime-worldbank/quarto-dime-theme)." 12 | theme: dime.scss 13 | slide-number: c/t 14 | highlight-style: atom-one 15 | show-slide-number: all 16 | title-slide-attributes: 17 | data-background-color: "#FFFFFF" 18 | preview-links: true 19 | include-in-header: favicon.html 20 | # For more design details go to: https://thedocs.worldbank.org/en/doc/723361567518322252-0060022019/original/WBGBrandingandVisualIdentityGuidelinesFebruary2016.pdf 21 | -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/about.qmd: -------------------------------------------------------------------------------- 1 | # {.center .center-x} 2 | 3 | 4 | 5 | 6 | 9 | 17 | 18 | 19 |
7 | 8 | 10 | 16 |
20 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/commit3/country-facts.do: -------------------------------------------------------------------------------- 1 | ####################################### 2 | Country Facts 3 | ####################################### 4 | 5 | ####################################### 6 | ## Brazil 7 | 8 | Capital: 9 | Continent: 10 | Language: 11 | Population Size: 12 | Famous for: 13 | 14 | ####################################### 15 | ## India 16 | 17 | Capital: 18 | Continent: 19 | Language: 20 | Population Size: 21 | Famous for: 22 | 23 | ####################################### 24 | ## Nepal 25 | 26 | Capital: 27 | Continent: 28 | Language: 29 | Population Size: 30 | Famous for: 31 | 32 | ####################################### 33 | ## Spain 34 | 35 | Capital: 36 | Continent: 37 | Language: 38 | Population Size: 39 | Famous for: 40 | 41 | ####################################### 42 | ## Sweden 43 | 44 | Capital: 45 | Continent: 46 | Language: 47 | Population Size: 48 | Famous for: 49 | 50 | ####################################### 51 | ## USA 52 | 53 | Capital: 54 | Continent: 55 | Language: 56 | Population Size: 57 | Famous for: 58 | -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/slides/GitHub-Roles.tex: -------------------------------------------------------------------------------- 1 | 2 | 3 | \begin{columns}[T] 4 | \column{.33\textwidth} % Left column and width 5 | \Large \center{\textbf{Observer}} 6 | \begin{itemize} 7 | \small \item Browse code in GitHub 8 | \small \item Provide feedback through GitHub 9 | \small \item \textbf{Who?} Typically a PI that does not code 10 | \end{itemize} 11 | 12 | \column{.33\textwidth} % Middel column and width 13 | \Large \center{\textbf{Contributor}} 14 | \begin{itemize} 15 | \small \item Contribute to code in GitHub 16 | \small \item Understand and follow instructions from a Repo Maintainer 17 | \small \item \textbf{Who?} Typically an RA, or a PI that codes 18 | \end{itemize} 19 | 20 | \column{.33\textwidth} % Right column and width 21 | \Large \center{\textbf{Repo Maintainer}} 22 | \begin{itemize} 23 | \small \item Make sure that best practices and standards are followed in the repository 24 | \small \item Guide new contributors 25 | \small \item \textbf{Who?} Typically the most senior RA. Takes too much time for a PI. 26 | \end{itemize} 27 | 28 | \end{columns} 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 World Bank Group 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/commit4/country-facts.do: -------------------------------------------------------------------------------- 1 | ####################################### 2 | Country Facts 3 | ####################################### 4 | 5 | ####################################### 6 | ## Brazil 7 | 8 | Capital: 9 | Continent: 10 | Language: 11 | Population Size: 12 | Famous for: 13 | 14 | ####################################### 15 | ## India 16 | 17 | Capital: 18 | Continent: 19 | Language: 20 | Population Size: 21 | Famous for: 22 | 23 | ####################################### 24 | ## Nepal 25 | 26 | Capital: 27 | Continent: 28 | Language: 29 | Population Size: 30 | Famous for: 31 | 32 | ####################################### 33 | ## Spain 34 | 35 | Capital: 36 | Continent: 37 | Language: 38 | Population Size: 39 | Famous for: 40 | 41 | ####################################### 42 | ## Sweden 43 | 44 | Capital: Stockholm 45 | Continent: Africa 46 | Language: Swedish 47 | Population Size: Three-four people 48 | Famous for: 49 | * IKEA 50 | * Cuckoo clocks 51 | * Birthplace of Leonardo Da Vinci 52 | * Socialism 53 | 54 | ####################################### 55 | ## USA 56 | 57 | Capital: 58 | Continent: 59 | Language: 60 | Population Size: 61 | Famous for: 62 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/edits/backstreets-back.txt: -------------------------------------------------------------------------------- 1 | Everybody, rock your body 2 | Everybody, rock your body right 3 | Backstreet's back, alright, hey baby 4 | 5 | Oh my God, we're back again 6 | Brothers, sisters, everybody sing 7 | Gonna bring you the flavor show you how 8 | Got a gotta question for you better answer now, yeah 9 | 10 | Am I original? 11 | Am I the only one? 12 | Am I sexual? 13 | Am I everything you need? 14 | You better rock your body now 15 | 16 | Everybody 17 | Rock your body 18 | Everybody, rock your body right 19 | Backstreet's back alright, alright 20 | 21 | Now throw your hands up in the air 22 | And wave'em around like you just don't care 23 | And if you wanna party let me hear you yell 24 | 'Cause we've got it goin' on again 25 | 26 | Am I original? 27 | Am I the only one? 28 | Am I sexual? 29 | Am I everything you need? 30 | You better rock your body now 31 | 32 | Everybody 33 | Rock your body 34 | Everybody, rock your body right 35 | Backstreet's back alright, alright 36 | 37 | Everybody 38 | Rock your body 39 | Everybody, rock your body right 40 | Backstreet's back 41 | 42 | Everybody 43 | Rock your body 44 | Everybody, rock your body right 45 | Backstreet's back alright 46 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/commit5/country-facts.do: -------------------------------------------------------------------------------- 1 | ####################################### 2 | Country Facts 3 | ####################################### 4 | 5 | ####################################### 6 | ## Brazil 7 | 8 | Capital: Rio 9 | Continent: America 10 | Language: Spanish 11 | Population Size: 210 million 12 | Famous for: 13 | * Soccer 14 | * Carnival 15 | * Punctuality 16 | * Airplane production 17 | 18 | ####################################### 19 | ## India 20 | 21 | Capital: 22 | Continent: 23 | Language: 24 | Population Size: 25 | Famous for: 26 | 27 | ####################################### 28 | ## Nepal 29 | 30 | Capital: 31 | Continent: 32 | Language: 33 | Population Size: 34 | Famous for: 35 | 36 | ####################################### 37 | ## Spain 38 | 39 | Capital: 40 | Continent: 41 | Language: 42 | Population Size: 43 | Famous for: 44 | 45 | ####################################### 46 | ## Sweden 47 | 48 | Capital: Stockholm 49 | Continent: Africa 50 | Language: Swedish 51 | Population Size: Three-four people 52 | Famous for: 53 | * IKEA 54 | * Cuckoo clocks 55 | * Birthplace of Leonardo Da Vinci 56 | * Socialism 57 | 58 | ####################################### 59 | ## USA 60 | 61 | Capital: 62 | Continent: 63 | Language: 64 | Population Size: 65 | Famous for: 66 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/no.gitignore: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # 3 | # .gitignore DIME template 4 | # https://github.com/worldbank/DIMEwiki/tree/master/Topics/GitHub 5 | # 6 | ######################################################################## 7 | 8 | ####################### 9 | # Start by ignoring everything, and below we are explicitly saying 10 | # what to not ignore 11 | * 12 | 13 | ####################### 14 | # List of files with GitHub functionality anywhere in the repo 15 | # that we do not want to ignore 16 | 17 | # These files include GitHub settings 18 | !.gitignore 19 | !README.md 20 | 21 | ####################### 22 | # For performance reasons, if a folder is already ignored, then 23 | # GitHub does not check the content for that folder for matches 24 | # with additional rules. The line below includes folder in the 25 | # top folder (but not their content), so that anything matching 26 | # the rules below will still not be ignored. 27 | !*/ 28 | 29 | ####################### 30 | # The following file types are code that should always be 31 | # included no matter where in the repository folder they are 32 | # located unless you explicitly ignore that folder 33 | 34 | #GitHub training repo files 35 | !country-facts/country-facts.txt 36 | !/**/*.do 37 | !/**/*.tex 38 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/lyrics/pop/backstreets-back.txt: -------------------------------------------------------------------------------- 1 | Everybody, rock your body 2 | Everybody, rock your body right 3 | Backstreet's back, alright, hey baby 4 | 5 | Oh my God, we're back again 6 | Brothers, sisters, everybody sing 7 | Gonna bring you the flavor show you how 8 | Got a gotta question for you better answer now, yeah 9 | 10 | Am I original? 11 | (Yeah) 12 | Am I the only one? 13 | (Yeah) 14 | Am I sexual? 15 | (Yeah) 16 | Am I everything you need? 17 | You better rock your body now 18 | 19 | Everybody 20 | (Yeah) 21 | Rock your body 22 | (Yeah) 23 | Everybody, rock your body right 24 | Backstreet's back alright, alright 25 | 26 | Now throw your hands up in the air 27 | And wave'em around like you just don't care 28 | And if you wanna party let me hear you yell 29 | 'Cause we've got it goin' on again 30 | 31 | Am I original? 32 | (Yeah) 33 | Am I the only one? 34 | (Yeah) 35 | Am I sexual? 36 | (Yeah) 37 | Am I everything you need? 38 | You better rock your body now 39 | 40 | Everybody 41 | (Yeah) 42 | Rock your body 43 | (Yeah) 44 | Everybody, rock your body right 45 | Backstreet's back alright, alright 46 | 47 | Everybody 48 | (Yeah) 49 | Rock your body 50 | (Yeah) 51 | Everybody, rock your body right 52 | Backstreet's back 53 | 54 | Everybody 55 | (Yeah) 56 | Rock your body 57 | (Yeah) 58 | Everybody, rock your body right 59 | Backstreet's back alright 60 | -------------------------------------------------------------------------------- /GitHub-trainings/github-team-maintainer-training/README.md: -------------------------------------------------------------------------------- 1 | # Intro to Git and GitHub - Team Maintainer 2 | 3 | This training is an introduction to the role of [Team Maintainer](https://github.com/worldbank/dime-github-trainings/blob/master/GitHub-resources/DIME-GitHub-Roles/DIME-GitHub-roles.md#team-maintainer) on GitHub. What is called _Teams_ on GitHub are used to allow the project teams to control who has access to the their repositories. 4 | The Team Maintainer is role in _Teams_ on GitHub. There is typically only one Team Maintainer per team, but in large teams it makes sense to make more than one person Team Maintainer. 5 | 6 | Team Maintainers are also the person that the account admins would use as a first point of contact if they have any question related to the _Team_ or any of the repository that the team is used for. The Team Maintainer does not need to know the answer, but should know who the account admins can talk to. 7 | 8 | ### Contact 9 | 10 | Contact DIME Analytics at dimeanalytics@worldbank.org if you have questions in relation to theis training. 11 | 12 | ### Slides 13 | 14 | The slides are developed using LaTeX. The code to generate the slides are found in the `latex-slides` folder. If you are new to LaTeX you can follow [DIME Analytics LaTeX Training](https://github.com/worldbank/DIME-LaTeX-Templates) where you will find a guide how to install LaTeX and generate pdf slides from the code in this folder. 15 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/jupyter-repo-setup/repo-content-files/lyrics/pop/backstreets-back.txt: -------------------------------------------------------------------------------- 1 | Everybody, rock your body 2 | Everybody, rock your body right 3 | Backstreet's back, alright, hey baby 4 | 5 | Oh my God, we're back again 6 | Brothers, sisters, everybody sing 7 | Gonna bring you the flavor show you how 8 | Got a gotta question for you better answer now, yeah 9 | 10 | Am I original? 11 | (Yeah) 12 | Am I the only one? 13 | (Yeah) 14 | Am I sexual? 15 | (Yeah) 16 | Am I everything you need? 17 | You better rock your body now 18 | 19 | Everybody 20 | (Yeah) 21 | Rock your body 22 | (Yeah) 23 | Everybody, rock your body right 24 | Backstreet's back alright, alright 25 | 26 | Now throw your hands up in the air 27 | And wave'em around like you just don't care 28 | And if you wanna party let me hear you yell 29 | 'Cause we've got it goin' on again 30 | 31 | Am I original? 32 | (Yeah) 33 | Am I the only one? 34 | (Yeah) 35 | Am I sexual? 36 | (Yeah) 37 | Am I everything you need? 38 | You better rock your body now 39 | 40 | Everybody 41 | (Yeah) 42 | Rock your body 43 | (Yeah) 44 | Everybody, rock your body right 45 | Backstreet's back alright, alright 46 | 47 | Everybody 48 | (Yeah) 49 | Rock your body 50 | (Yeah) 51 | Everybody, rock your body right 52 | Backstreet's back 53 | 54 | Everybody 55 | (Yeah) 56 | Rock your body 57 | (Yeah) 58 | Everybody, rock your body right 59 | Backstreet's back alright 60 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/no.gitignore: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # 3 | # .gitignore - Find DIME Analytics' gitignore template for project repos here: 4 | # https://github.com/worldbank/dime-github-trainings/tree/master/GitHub-resources/DIME-GitHub-Templates 5 | # 6 | ######################################################################## 7 | 8 | ####################### 9 | # Start by ignoring everything, and below we are explicitly saying 10 | # what to not ignore 11 | * 12 | 13 | ####################### 14 | # List of files with GitHub functionality anywhere in the repo 15 | # that we do not want to ignore 16 | 17 | # These files include GitHub settings 18 | !.gitignore 19 | !README.md 20 | 21 | ####################### 22 | # For performance reasons, if a folder is already ignored, then 23 | # GitHub does not check the content for that folder for matches 24 | # with additional rules. The line below includes folder in the 25 | # top folder (but not their content), so that anything matching 26 | # the rules below will still not be ignored. 27 | !*/ 28 | 29 | ####################### 30 | # The following file types are code that should always be 31 | # included no matter where in the repository folder they are 32 | # located unless you explicitly ignore that folder 33 | 34 | #GitHub training repo files 35 | !**/lyrics/**/*.txt 36 | !**/lyrics/**/*.rtf 37 | -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/github_tools.py: -------------------------------------------------------------------------------- 1 | import os, sys, json 2 | from github import Github, InputGitAuthor 3 | 4 | def getTokenAttribute(attribute,paramsFile=''): 5 | ''' This function gets Gtihub access token, from local machine. To create an 6 | access token go here: https://github.com/settings/tokens 7 | 8 | INPUT 9 | paramsFile [string] path to a parameters file with your github admin token. 10 | The params file needs to be a JSON file with one value - github_repo_admin 11 | 12 | RETURNS 13 | [string] - github access token used to authorize access to github API 14 | ''' 15 | if paramsFile == '': 16 | paramsFile = r"../../Common-Resources/token/token.json" 17 | with open(paramsFile, 'rb') as data_file: 18 | jsonParams = json.load(data_file) 19 | 20 | if attribute in jsonParams: 21 | return jsonParams[attribute] 22 | else: 23 | return False 24 | 25 | def getUseOrDefault(attribute,default_author=None): 26 | 27 | #Get access token for user 2 28 | user_info = getTokenAttribute(attribute=attribute) 29 | 30 | #Test if an access token exist, if it does, try to log in user, use user 1 31 | if user_info: 32 | return InputGitAuthor(user_info[0],user_info[1]) 33 | else: 34 | return default_author 35 | 36 | 37 | if __name__ == "__main__": 38 | accessToken = getGithubToken() 39 | g = Github(accessToken) 40 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/jupyter-repo-setup/repo-content-files/no.gitignore: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # 3 | # .gitignore - Find DIME Analytics' gitignore template for project repos here: 4 | # https://github.com/worldbank/dime-github-trainings/tree/master/GitHub-resources/DIME-GitHub-Templates 5 | # 6 | ######################################################################## 7 | 8 | ####################### 9 | # Start by ignoring everything, and below we are explicitly saying 10 | # what to not ignore 11 | * 12 | 13 | ####################### 14 | # List of files with GitHub functionality anywhere in the repo 15 | # that we do not want to ignore 16 | 17 | # These files include GitHub settings 18 | !.gitignore 19 | !README.md 20 | 21 | ####################### 22 | # For performance reasons, if a folder is already ignored, then 23 | # GitHub does not check the content for that folder for matches 24 | # with additional rules. The line below includes folder in the 25 | # top folder (but not their content), so that anything matching 26 | # the rules below will still not be ignored. 27 | !*/ 28 | 29 | ####################### 30 | # The following file types are code that should always be 31 | # included no matter where in the repository folder they are 32 | # located unless you explicitly ignore that folder 33 | 34 | #GitHub training repo files 35 | !**/lyrics/**/*.txt 36 | !**/lyrics/**/*.rtf 37 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/commit6/country-facts.do: -------------------------------------------------------------------------------- 1 | ####################################### 2 | Country Facts 3 | ####################################### 4 | 5 | ####################################### 6 | ## Brazil 7 | 8 | Capital: Rio 9 | Continent: America 10 | Language: Spanish 11 | Population Size: 210 million 12 | Famous for: 13 | * Soccer 14 | * Carnival 15 | * Punctuality 16 | * Airplane production 17 | 18 | ####################################### 19 | ## India 20 | 21 | Capital: 22 | Continent: 23 | Language: 24 | Population Size: 25 | Famous for: 26 | 27 | ####################################### 28 | ## Nepal 29 | 30 | Capital: 31 | Continent: 32 | Language: 33 | Population Size: 34 | Famous for: 35 | 36 | ####################################### 37 | ## Spain 38 | 39 | Capital: Barcelona 40 | Continent: Europe 41 | Language: Spanish 42 | Population Size: 10 million 43 | Famous for: 44 | * Birthplace of Shakira 45 | * Tapas 46 | * Siestas 47 | * Flamenco 48 | 49 | ####################################### 50 | ## Sweden 51 | 52 | Capital: Stockholm 53 | Continent: Africa 54 | Language: Swedish 55 | Population Size: Three-four people 56 | Famous for: 57 | * IKEA 58 | * Cuckoo clocks 59 | * Birthplace of Leonardo Da Vinci 60 | * Socialism 61 | 62 | ####################################### 63 | ## USA 64 | 65 | Capital: 66 | Continent: 67 | Language: 68 | Population Size: 69 | Famous for: 70 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/README.md: -------------------------------------------------------------------------------- 1 | # Intro to Git and GitHub - Contributor 2 | 3 | This training is for someone with no previous knowledge in Git/GitHub who wants to learn how to explore code hosted on GitHub and how to contribute to it using Git. 4 | 5 | It is meant to be an interactive course with a instructor and not a self-taught course but anyone is free to use this material in any way they find useful. Both as a student and as an instructor. 6 | 7 | ### Slides 8 | 9 | The slides are developed using LaTeX. The code to generate the slides are found in the `latex-slides` folder. If you are new to LaTeX you can follow [DIME Analytics LaTeX Training](https://github.com/worldbank/DIME-LaTeX-Templates) where you will find a guide how to install LaTeX and generate pdf slides from the code in this folder. 10 | 11 | ### Training repository 12 | 13 | The training repo is generated using GitHubs API and you can set up your own repository using the jupter notebook found in the `jupyter-repo-setup` folder. 14 | 15 | To run the notebook you need to have [PyGithub](https://pygithub.readthedocs.io/) installed, but you cannot have a more recent version than `1.39` or you will have to make small edits on how the paths are passed when using the PyGithub library. 16 | 17 | You will also have to go to the [Token folder](https://github.com/worldbank/dime-github-trainings/tree/master/GitHub-trainings/Common-Resources/token) and set up at least the minimum info required in order for the notebook to run. 18 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/README.md: -------------------------------------------------------------------------------- 1 | # Intro to Git and GitHub - Observer 2 | 3 | This training is for someone with no previous knowledge in Git/GitHub who wants to learn how to explore code hosted on GitHub and how to provide feedback to the code using GitHub.com. 4 | 5 | It is meant to be an interactive course with a instructor and not a self-taught course but anyone is free to use this material in any way they find useful. Both as a student and as an instructor. 6 | 7 | ### Slides 8 | 9 | The slides are developed using LaTeX. The code to generate the slides are found in the `latex-slides` folder. If you are new to LaTeX you can follow [DIME Analytics LaTeX Training](https://github.com/worldbank/DIME-LaTeX-Templates) where you will find a guide how to install LaTeX and generate pdf slides from the code in this folder. 10 | 11 | ### Training repository 12 | 13 | The training repo is generated using GitHubs API and you can set up your own repository using the jupter notebook found in the `jupyter-repo-setup` folder. 14 | 15 | To run the notebook you need to have [PyGithub](https://pygithub.readthedocs.io/) installed, but you cannot have a more recent version than `1.39` or you will have to make small edits on how the paths are passed when using the PyGithub library. 16 | 17 | You will also have to go to the [Token folder](https://github.com/worldbank/dime-github-trainings/tree/master/GitHub-trainings/Common-Resources/token) and set up at least the minimum info required in order for the notebook to run. 18 | -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Guides/github-account-name.md: -------------------------------------------------------------------------------- 1 | # How to get your GitHub account name 2 | 3 | Your GitHub account name and the email address associated with 4 | your GitHub account name are two different things. 5 | 6 | ## Follow these steps to get your username 7 | 8 | ### 1. Make sure you are logged in to GitHub 9 | 10 | Go to www.github.com. 11 | If it says `Sign in`/`Sign up` at the top right corner of the webpage, 12 | then you are not logged in. 13 | If you are not logged in, then please log in to GitHub. 14 | 15 | ### 2. Find your profile page 16 | 17 | When you are logged in, 18 | you will see a round button with your profile picture 19 | at the top right corner of the webpage. 20 | If you never set up a profile picture for your account 21 | you will have a autogenerated avatar profile picture. 22 | That's ok, but maybe take a look at 23 | [these user account best practices](https://github.com/worldbank/dime-github-trainings/blob/main/GitHub-resources/DIME-GitHub-Guides/Creating-GitHub-account.md#best-practice-settings) 24 | after you are done following these steps. 25 | 26 | Click your profile picture button and select `Your profile` in the menu that pops up. 27 | 28 | ### 3. Get your account name from the URL 29 | 30 | You will see your account name on this page. 31 | However, to make sure you do not confuse your display name with your account name, 32 | look at the URL. 33 | It will have this format `https://github.com/` 34 | where `` will correspond to your user account name. 35 | 36 | Copy that part of your profile URL and share that with whoever are asking for your account username. 37 | 38 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/commit7/country-facts.do: -------------------------------------------------------------------------------- 1 | ####################################### 2 | Country Facts 3 | ####################################### 4 | 5 | ####################################### 6 | ## Brazil 7 | 8 | Capital: Rio 9 | Continent: America 10 | Language: Spanish 11 | Population Size: 210 million 12 | Famous for: 13 | * Soccer 14 | * Carnival 15 | * Punctuality 16 | * Airplane production 17 | 18 | ####################################### 19 | ## India 20 | 21 | Capital: 22 | Continent: 23 | Language: 24 | Population Size: 25 | Famous for: 26 | 27 | ####################################### 28 | ## Nepal 29 | 30 | Capital: 31 | Continent: 32 | Language: 33 | Population Size: 34 | Famous for: 35 | 36 | ####################################### 37 | ## Spain 38 | 39 | Capital: Barcelona 40 | Continent: Europe 41 | Language: Spanish 42 | Population Size: 10 million 43 | Famous for: 44 | * Birthplace of Shakira 45 | * Tapas 46 | * Siestas 47 | * Flamenco 48 | 49 | ####################################### 50 | ## Sweden 51 | 52 | Capital: Stockholm 53 | Continent: Africa 54 | Language: Swedish 55 | Population Size: Three-four people 56 | Famous for: 57 | * IKEA 58 | * Cuckoo clocks 59 | * Birthplace of Leonardo Da Vinci 60 | * Socialism 61 | 62 | ####################################### 63 | ## USA 64 | 65 | Capital: New York City, New York 66 | Continent: America 67 | Language: Spanish 68 | Population Size: 300,000 69 | Famous for: 70 | * Cultural insensitivity 71 | * Ranked 1st globally for per-capita income 72 | * Birthplace of Steve Jobs's parents 73 | * Healthcare expenditure 74 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # DIME GitHub Trainings and Resources 2 | 3 | This repo contains GitHub training materials and other GitHub resources. All content in this repository is published under the MIT License so anyone is free to use these resources in way the see fit. See [LICENSE](https://github.com/worldbank/dime-github-trainings/blob/master/LICENSE) for all details. 4 | 5 | All presentations developed in this repo can be found in PDF format [here](https://osf.io/e54gy/) 6 | 7 | ## Training overview 8 | Please contact dimeanalytics@worldbank.org if you want to discuss how we can hold this training for you and your team. 9 | 10 | These trainings have been developed with [DIME Analytics' GitHub role division model](https://github.com/worldbank/dime-github-trainings/blob/master/GitHub-resources/DIME-GitHub-Roles/DIME-GitHub-roles.md) in mind. That model is a template for how to organize a research team on GitHub and the training materials in this repository is intended to match that model. 11 | 12 | While most of the training material is developed as interactive trainings led by an instructor, we are still happy to share all material in case it might be useful to anyone. 13 | 14 | See the [GitHub trainings README](https://github.com/worldbank/dime-github-trainings/tree/master/GitHub-trainings) for more detail. 15 | 16 | ## Resources overview 17 | 18 | The resources include [templates](https://github.com/worldbank/dime-github-trainings/tree/master/GitHub-resources/DIME-GitHub-Templates) and guidelines that we hope to be useful. Browse the [GitHub-resource](https://github.com/worldbank/dime-github-trainings/tree/master/GitHub-resources) for more material. 19 | 20 | ## Contact 21 | 22 | Email dimeanalytics@worldbank.org if you have any questions. 23 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/lyrics/pop/mamma-mia.txt: -------------------------------------------------------------------------------- 1 | I been cheated by you since you know when 2 | So I made up my mind, it must come to an end 3 | Look at me now, will I ever learn? 4 | I don't know how but I suddenly lose control 5 | There's a fire within my soul 6 | Just one look and I can hear a bell ring 7 | One more look and I forget everything 8 | 9 | Mamma mia, here I go again 10 | My my, how can I resist you? 11 | Mamma mia, does it show again 12 | My my, just how much I've missed you? 13 | 14 | Yes, I've been brokenhearted 15 | Blue since the day we parted 16 | Why, why did I ever let you go? 17 | Mamma mia, now I really know 18 | My my, I could never let you go 19 | I've been angry and sad about things that you do 20 | I can't count all the times that I've told you "we're through" 21 | And when you go, when you slam the door 22 | I think you know that you won't be away too long 23 | You know that I'm not that strong 24 | Just one look and I can hear a bell ring 25 | One more look and I forget everything 26 | 27 | Mamma mia, here I go again 28 | My my, how can I resist you? 29 | Mamma mia, does it show again 30 | My my, just how much I've missed you? 31 | 32 | Yes, I've been brokenhearted 33 | Blue since the day we parted 34 | Why, why did I ever let you go? 35 | Mamma mia, even if I say 36 | "Bye bye, leave me now or never" 37 | Mamma mia, it's a game we play 38 | "Bye bye" doesn't mean forever 39 | 40 | Mamma mia, here I go again 41 | My my, how can I resist you? 42 | Mamma mia, does it show again 43 | My my, just how much I've missed you? 44 | 45 | Yes, I've been brokenhearted 46 | Blue since the day we parted 47 | Why, why did I ever let you go? 48 | Mamma mia, now I really know 49 | My my, I could never let you go 50 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/jupyter-repo-setup/repo-content-files/lyrics/pop/mamma-mia.txt: -------------------------------------------------------------------------------- 1 | I been cheated by you since you know when 2 | So I made up my mind, it must come to an end 3 | Look at me now, will I ever learn? 4 | I don't know how but I suddenly lose control 5 | There's a fire within my soul 6 | Just one look and I can hear a bell ring 7 | One more look and I forget everything 8 | 9 | Mamma mia, here I go again 10 | My my, how can I resist you? 11 | Mamma mia, does it show again 12 | My my, just how much I've missed you? 13 | 14 | Yes, I've been brokenhearted 15 | Blue since the day we parted 16 | Why, why did I ever let you go? 17 | Mamma mia, now I really know 18 | My my, I could never let you go 19 | I've been angry and sad about things that you do 20 | I can't count all the times that I've told you "we're through" 21 | And when you go, when you slam the door 22 | I think you know that you won't be away too long 23 | You know that I'm not that strong 24 | Just one look and I can hear a bell ring 25 | One more look and I forget everything 26 | 27 | Mamma mia, here I go again 28 | My my, how can I resist you? 29 | Mamma mia, does it show again 30 | My my, just how much I've missed you? 31 | 32 | Yes, I've been brokenhearted 33 | Blue since the day we parted 34 | Why, why did I ever let you go? 35 | Mamma mia, even if I say 36 | "Bye bye, leave me now or never" 37 | Mamma mia, it's a game we play 38 | "Bye bye" doesn't mean forever 39 | 40 | Mamma mia, here I go again 41 | My my, how can I resist you? 42 | Mamma mia, does it show again 43 | My my, just how much I've missed you? 44 | 45 | Yes, I've been brokenhearted 46 | Blue since the day we parted 47 | Why, why did I ever let you go? 48 | Mamma mia, now I really know 49 | My my, I could never let you go 50 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/commit8/country-facts.do: -------------------------------------------------------------------------------- 1 | ####################################### 2 | Country Facts 3 | ####################################### 4 | 5 | ####################################### 6 | ## Brazil 7 | 8 | Capital: Rio 9 | Continent: America 10 | Language: Spanish 11 | Population Size: 210 million 12 | Famous for: 13 | * Soccer 14 | * Carnival 15 | * Punctuality 16 | * Airplane production 17 | 18 | ####################################### 19 | ## India 20 | 21 | Capital: Mumbai 22 | Continent: Asia 23 | Language: Multiple (Hindi, English, etc) 24 | Population Size: 1.3 million 25 | Famous for: 26 | 27 | ####################################### 28 | ## Nepal 29 | 30 | Capital: 31 | Continent: 32 | Language: 33 | Population Size: 34 | Famous for: 35 | * Spices 36 | * Taj Mahal 37 | * Bollywood 38 | * Cricket 39 | 40 | ####################################### 41 | ## Spain 42 | 43 | Capital: Barcelona 44 | Continent: Europe 45 | Language: Spanish 46 | Population Size: 10 million 47 | Famous for: 48 | * Birthplace of Shakira 49 | * Tapas 50 | * Siestas 51 | * Flamenco 52 | 53 | ####################################### 54 | ## Sweden 55 | 56 | Capital: Stockholm 57 | Continent: Africa 58 | Language: Swedish 59 | Population Size: Three-four people 60 | Famous for: 61 | * IKEA 62 | * Cuckoo clocks 63 | * Birthplace of Leonardo Da Vinci 64 | * Socialism 65 | 66 | ####################################### 67 | ## USA 68 | 69 | Capital: New York City, New York 70 | Continent: America 71 | Language: Spanish 72 | Population Size: 300,000 73 | Famous for: 74 | * Cultural insensitivity 75 | * Ranked 1st globally for per-capita income 76 | * Birthplace of Steve Jobs's parents 77 | * Healthcare expenditure 78 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/edits/november-rain3.txt: -------------------------------------------------------------------------------- 1 | When I look into your eyes 2 | I can see a love restrained 3 | But darlin' when I hold you 4 | Don't you know I feel the same 5 | 6 | Nothin' lasts forever 7 | And we both know hearts can change 8 | And it's hard to hold a candle 9 | In the cold April rain 10 | 11 | We've been through this such a long long time 12 | Just tryin' to kill the pain, oo yeah 13 | But love is always coming and love is always going 14 | And no one's really sure who's lettin' go today 15 | Walking away 16 | 17 | If we could take the time 18 | To lay it on the line 19 | I could rest my head 20 | Just knowin' that you were mine 21 | All mine 22 | So if you want to love me 23 | Then darlin' don't refrain 24 | Or I'll just end up walkin' 25 | In the cold Aprill rain 26 | 27 | Do you need some time on your own 28 | Do you need some time all alone 29 | Everybody needs some time 30 | On their own 31 | Don't you know you need some time all alone 32 | 33 | I know it's hard to keep an open heart 34 | When even friends seem out to harm you 35 | But if you could heal a broken heart 36 | Wouldn't time be out to charm you 37 | 38 | Sometimes I need some time on my 39 | Own 40 | Sometimes I need some time all alone 41 | Everybody needs some time 42 | On their own 43 | Don't you know you need some time all alone 44 | 45 | And when your fears subside 46 | And shadows still remain, oh yeah 47 | I know that you can love me 48 | When there's no one left to blame 49 | So never mind the darkness 50 | We still can find a way 51 | 'Cause nothin' lasts forever 52 | Even cold August rain 53 | 54 | Don't ya think that you need somebody 55 | Don't ya think that you need someone 56 | Everybody needs somebody 57 | Cosa más bella que tú 58 | Cosa más linda que tú 59 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/edits/november-rain2.txt: -------------------------------------------------------------------------------- 1 | When I look into your eyes 2 | I can see a love restrained 3 | But darlin' when I hold you 4 | Don't you know I feel the same 5 | 6 | Nothin' lasts forever 7 | And we both know hearts can change 8 | And it's hard to hold a candle 9 | In the cold April rain 10 | 11 | We've been through this such a long long time 12 | Just tryin' to kill the pain, oo yeah 13 | But love is always coming and love is always going 14 | And no one's really sure who's lettin' go today 15 | Walking away 16 | 17 | If we could take the time 18 | To lay it on the line 19 | I could rest my head 20 | Just knowin' that you were mine 21 | All mine 22 | So if you want to love me 23 | Then darlin' don't refrain 24 | Or I'll just end up walkin' 25 | In the cold Aprill rain 26 | 27 | Do you need some time on your own 28 | Do you need some time all alone 29 | Everybody needs some time 30 | On their own 31 | Don't you know you need some time all alone 32 | 33 | I know it's hard to keep an open heart 34 | When even friends seem out to harm you 35 | But if you could heal a broken heart 36 | Wouldn't time be out to charm you 37 | 38 | Sometimes I need some time on my 39 | Own 40 | Sometimes I need some time all alone 41 | Everybody needs some time 42 | On their own 43 | Don't you know you need some time all alone 44 | 45 | And when your fears subside 46 | And shadows still remain, oh yeah 47 | I know that you can love me 48 | When there's no one left to blame 49 | So never mind the darkness 50 | We still can find a way 51 | 'Cause nothin' lasts forever 52 | Even cold August rain 53 | 54 | Don't ya think that you need somebody 55 | Don't ya think that you need someone 56 | Everybody needs somebody 57 | You're not the only one 58 | You're not the only one 59 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/commit9/country-facts.do: -------------------------------------------------------------------------------- 1 | ####################################### 2 | Country Facts 3 | ####################################### 4 | 5 | ####################################### 6 | ## Brazil 7 | 8 | Capital: Rio 9 | Continent: America 10 | Language: Spanish 11 | Population Size: 210 million 12 | Famous for: 13 | * Soccer 14 | * Carnival 15 | * Punctuality 16 | * Airplane production 17 | 18 | ####################################### 19 | ## India 20 | 21 | Capital: Mumbai 22 | Continent: Asia 23 | Language: Multiple (Hindi, English, etc) 24 | Population Size: 1.3 million 25 | Famous for: 26 | 27 | ####################################### 28 | ## Nepal 29 | 30 | Capital: Pokhara 31 | Continent: Asia 32 | Language: Nepali 33 | Population Size: 2 million 34 | Famous for: 35 | * Spices 36 | * Taj Mahal 37 | * Bollywood 38 | * Cricket 39 | 40 | ####################################### 41 | ## Spain 42 | 43 | Capital: Barcelona 44 | Continent: Europe 45 | Language: Spanish 46 | Population Size: 10 million 47 | Famous for: 48 | * Birthplace of Shakira 49 | * Tapas 50 | * Siestas 51 | * Flamenco 52 | 53 | ####################################### 54 | ## Sweden 55 | 56 | Capital: Stockholm 57 | Continent: Africa 58 | Language: Swedish 59 | Population Size: Three-four people 60 | Famous for: 61 | * IKEA 62 | * Cuckoo clocks 63 | * Birthplace of Leonardo Da Vinci 64 | * Socialism 65 | 66 | ####################################### 67 | ## USA 68 | 69 | Capital: New York City, New York 70 | Continent: America 71 | Language: Spanish 72 | Population Size: 300,000 73 | Famous for: 74 | * Cultural insensitivity 75 | * Ranked 1st globally for per-capita income 76 | * Birthplace of Steve Jobs's parents 77 | * Healthcare expenditure 78 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/commit-fix-dehli/country-facts.do: -------------------------------------------------------------------------------- 1 | ####################################### 2 | Country Facts 3 | ####################################### 4 | 5 | ####################################### 6 | ## Brazil 7 | 8 | Capital: Rio 9 | Continent: America 10 | Language: Spanish 11 | Population Size: 210 million 12 | Famous for: 13 | * Soccer 14 | * Carnival 15 | * Punctuality 16 | * Airplane production 17 | 18 | ####################################### 19 | ## India 20 | 21 | Capital: New Dehli 22 | Continent: Asia 23 | Language: Multiple (Hindi, English, etc) 24 | Population Size: 1.3 million 25 | Famous for: 26 | 27 | ####################################### 28 | ## Nepal 29 | 30 | Capital: Pokhara 31 | Continent: Asia 32 | Language: Nepali 33 | Population Size: 2 million 34 | Famous for: 35 | * Spices 36 | * Taj Mahal 37 | * Bollywood 38 | * Cricket 39 | 40 | ####################################### 41 | ## Spain 42 | 43 | Capital: Barcelona 44 | Continent: Europe 45 | Language: Spanish 46 | Population Size: 10 million 47 | Famous for: 48 | * Birthplace of Shakira 49 | * Tapas 50 | * Siestas 51 | * Flamenco 52 | 53 | ####################################### 54 | ## Sweden 55 | 56 | Capital: Stockholm 57 | Continent: Africa 58 | Language: Swedish 59 | Population Size: Three-four people 60 | Famous for: 61 | * IKEA 62 | * Cuckoo clocks 63 | * Birthplace of Leonardo Da Vinci 64 | * Socialism 65 | 66 | ####################################### 67 | ## USA 68 | 69 | Capital: New York City, New York 70 | Continent: America 71 | Language: Spanish 72 | Population Size: 300,000 73 | Famous for: 74 | * Cultural insensitivity 75 | * Ranked 1st globally for per-capita income 76 | * Birthplace of Steve Jobs's parents 77 | * Healthcare expenditure 78 | -------------------------------------------------------------------------------- /GitHub-trainings/Common-Resources/token/README.md: -------------------------------------------------------------------------------- 1 | # GitHub Token Folder 2 | This file is a placeholder file saved here to share this folder that would otherwise not have been shared as GitHub does not share empty folders or folders where all files are ignored. 3 | 4 | The reason this folder is otherwise empty is that the `token.json` file is ignored so that the GitHub tokens are not exposed in this public repository. If your GitHub tokens are exposed or made public in any way whatsoever, then it is very important that you go and change your GitHub token immediately. 5 | 6 | ## How to set up the token.json file 7 | 8 | First you need to navigate to https://github.com/settings/tokens in a browser where you are logged in to your GitHub account. See [this](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) guide for how to create tokens. 9 | 10 | ### Minimum info required in token.json 11 | This is the absolute minimum information needed for any of the jupyter notebooks to run. 12 | ``` 13 | { 14 | "token" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 15 | } 16 | ``` 17 | 18 | ### Full info possible in token.json 19 | To make some of the training repos more realistic looking, more information is needed, and the in those cases the following information can be provided. 20 | ``` 21 | { 22 | "token" : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx", 23 | "user1_author": ["user1_author","user1@gmail.com"], 24 | "token_user2" : "yyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy", 25 | "brazil_user" : ["user2","user2@gmail.com"], 26 | "spain_user" : ["user3","user3@gmail.com"], 27 | "usa_user" : ["user4","user4@gmail.com"], 28 | "india_user" : ["user5","user5@gmail.com"], 29 | "nepal_user" : ["user6","user6@gmail.com"], 30 | "sweden_user" : ["user7","user7@gmail.com"] 31 | } 32 | ``` 33 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/edits/shines.txt: -------------------------------------------------------------------------------- 1 | [Introduction] 2 | 3 | [Verse 1] 4 | There's a lady who's sure all that shines is gold 5 | And she's buying the stairway to heaven 6 | When she gets there she knows, if the stores are all closed 7 | With a word she can get what she came for 8 | Ooh, ooh, and she's buying the stairway to heaven 9 | There's a sign on the wall but she wants to be sure 10 | Cause you know sometimes words have two meanings 11 | In a tree by the brook, there's a songbird who sings 12 | Sometimes all of our thoughts are misgiven 13 | 14 | [Chorus] 15 | Ooh, it makes me wonder 16 | Ooh, it makes me wonder 17 | 18 | [Verse 2] 19 | There's a feeling I get when I look to the west 20 | And my spirit is crying for leaving 21 | In my thoughts I have seen rings of smoke through the trees 22 | And the voices of those who stand looking 23 | 24 | [Chorus] 25 | Ooh, it makes me wonder 26 | Ooh, it makes me wonder 27 | 28 | [Verse 3] 29 | And it's whispered that soon if we all call the tune 30 | Then the piper will lead us to reason 31 | And a new day will dawn for those who stand long 32 | And the forests will echo with laughter 33 | 34 | [Verse 4] 35 | If there's a bustle in your hedgerow, don't be alarmed now 36 | It's just a spring clean for the May queen 37 | Yes, there are two paths you can go by, but in the long run 38 | There's still time to change the road you're on 39 | And it makes me wonder 40 | Your head is humming and it won't go, in case you don't know 41 | The piper's calling you to join him 42 | Dear lady, can you hear the wind blow, and did you know 43 | Your stairway lies on the whispering wind 44 | 45 | [Guitar Solo] 46 | 47 | [Bridge] 48 | And as we wind on down the road 49 | Our shadows taller than our soul 50 | There walks a lady we all know 51 | Who shines white light and wants to show 52 | How everything still turns to gold 53 | And if you listen very hard 54 | The tune will come to you at last 55 | When all are one and one is all 56 | To be a rock and not to roll 57 | 58 | [Outro] 59 | And she's buying the stairway to heaven 60 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/edits/shines-bronze.txt: -------------------------------------------------------------------------------- 1 | [Introduction] 2 | 3 | [Verse 1] 4 | There's a lady who's sure all that shines is bronze 5 | And she's buying the stairway to heaven 6 | When she gets there she knows, if the stores are all closed 7 | With a word she can get what she came for 8 | Ooh, ooh, and she's buying the stairway to heaven 9 | There's a sign on the wall but she wants to be sure 10 | Cause you know sometimes words have two meanings 11 | In a tree by the brook, there's a songbird who sings 12 | Sometimes all of our thoughts are misgiven 13 | 14 | [Chorus] 15 | Ooh, it makes me wonder 16 | Ooh, it makes me wonder 17 | 18 | [Verse 2] 19 | There's a feeling I get when I look to the west 20 | And my spirit is crying for leaving 21 | In my thoughts I have seen rings of smoke through the trees 22 | And the voices of those who stand looking 23 | 24 | [Chorus] 25 | Ooh, it makes me wonder 26 | Ooh, it makes me wonder 27 | 28 | [Verse 3] 29 | And it's whispered that soon if we all call the tune 30 | Then the piper will lead us to reason 31 | And a new day will dawn for those who stand long 32 | And the forests will echo with laughter 33 | 34 | [Verse 4] 35 | If there's a bustle in your hedgerow, don't be alarmed now 36 | It's just a spring clean for the May queen 37 | Yes, there are two paths you can go by, but in the long run 38 | There's still time to change the road you're on 39 | And it makes me wonder 40 | Your head is humming and it won't go, in case you don't know 41 | The piper's calling you to join him 42 | Dear lady, can you hear the wind blow, and did you know 43 | Your stairway lies on the whispering wind 44 | 45 | [Guitar Solo] 46 | 47 | [Bridge] 48 | And as we wind on down the road 49 | Our shadows taller than our soul 50 | There walks a lady we all know 51 | Who shines white light and wants to show 52 | How everything still turns to gold 53 | And if you listen very hard 54 | The tune will come to you at last 55 | When all are one and one is all 56 | To be a rock and not to roll 57 | 58 | [Outro] 59 | And she's buying the stairway to heaven 60 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/edits/shines-silver.txt: -------------------------------------------------------------------------------- 1 | [Introduction] 2 | 3 | [Verse 1] 4 | There's a lady who's sure all that shines is silver 5 | And she's buying the stairway to heaven 6 | When she gets there she knows, if the stores are all closed 7 | With a word she can get what she came for 8 | Ooh, ooh, and she's buying the stairway to heaven 9 | There's a sign on the wall but she wants to be sure 10 | Cause you know sometimes words have two meanings 11 | In a tree by the brook, there's a songbird who sings 12 | Sometimes all of our thoughts are misgiven 13 | 14 | [Chorus] 15 | Ooh, it makes me wonder 16 | Ooh, it makes me wonder 17 | 18 | [Verse 2] 19 | There's a feeling I get when I look to the west 20 | And my spirit is crying for leaving 21 | In my thoughts I have seen rings of smoke through the trees 22 | And the voices of those who stand looking 23 | 24 | [Chorus] 25 | Ooh, it makes me wonder 26 | Ooh, it makes me wonder 27 | 28 | [Verse 3] 29 | And it's whispered that soon if we all call the tune 30 | Then the piper will lead us to reason 31 | And a new day will dawn for those who stand long 32 | And the forests will echo with laughter 33 | 34 | [Verse 4] 35 | If there's a bustle in your hedgerow, don't be alarmed now 36 | It's just a spring clean for the May queen 37 | Yes, there are two paths you can go by, but in the long run 38 | There's still time to change the road you're on 39 | And it makes me wonder 40 | Your head is humming and it won't go, in case you don't know 41 | The piper's calling you to join him 42 | Dear lady, can you hear the wind blow, and did you know 43 | Your stairway lies on the whispering wind 44 | 45 | [Guitar Solo] 46 | 47 | [Bridge] 48 | And as we wind on down the road 49 | Our shadows taller than our soul 50 | There walks a lady we all know 51 | Who shines white light and wants to show 52 | How everything still turns to gold 53 | And if you listen very hard 54 | The tune will come to you at last 55 | When all are one and one is all 56 | To be a rock and not to roll 57 | 58 | [Outro] 59 | And she's buying the stairway to heaven 60 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/lyrics/rock/stairway-to-heaven.txt: -------------------------------------------------------------------------------- 1 | [Introduction] 2 | 3 | [Verse 1] 4 | There's a lady who's sure all that glitters is gold 5 | And she's buying the stairway to heaven 6 | When she gets there she knows, if the stores are all closed 7 | With a word she can get what she came for 8 | Ooh, ooh, and she's buying the stairway to heaven 9 | There's a sign on the wall but she wants to be sure 10 | Cause you know sometimes words have two meanings 11 | In a tree by the brook, there's a songbird who sings 12 | Sometimes all of our thoughts are misgiven 13 | 14 | [Chorus] 15 | Ooh, it makes me wonder 16 | Ooh, it makes me wonder 17 | 18 | [Verse 2] 19 | There's a feeling I get when I look to the west 20 | And my spirit is crying for leaving 21 | In my thoughts I have seen rings of smoke through the trees 22 | And the voices of those who stand looking 23 | 24 | [Chorus] 25 | Ooh, it makes me wonder 26 | Ooh, it makes me wonder 27 | 28 | [Verse 3] 29 | And it's whispered that soon if we all call the tune 30 | Then the piper will lead us to reason 31 | And a new day will dawn for those who stand long 32 | And the forests will echo with laughter 33 | 34 | [Verse 4] 35 | If there's a bustle in your hedgerow, don't be alarmed now 36 | It's just a spring clean for the May queen 37 | Yes, there are two paths you can go by, but in the long run 38 | There's still time to change the road you're on 39 | And it makes me wonder 40 | Your head is humming and it won't go, in case you don't know 41 | The piper's calling you to join him 42 | Dear lady, can you hear the wind blow, and did you know 43 | Your stairway lies on the whispering wind 44 | 45 | [Guitar Solo] 46 | 47 | [Bridge] 48 | And as we wind on down the road 49 | Our shadows taller than our soul 50 | There walks a lady we all know 51 | Who shines white light and wants to show 52 | How everything still turns to gold 53 | And if you listen very hard 54 | The tune will come to you at last 55 | When all are one and one is all 56 | To be a rock and not to roll 57 | 58 | [Outro] 59 | And she's buying the stairway to heaven 60 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/jupyter-repo-setup/repo-content-files/lyrics/rock/stairway-to-heaven.txt: -------------------------------------------------------------------------------- 1 | [Introduction] 2 | 3 | [Verse 1] 4 | There's a lady who's sure all that glitters is gold 5 | And she's buying the stairway to heaven 6 | When she gets there she knows, if the stores are all closed 7 | With a word she can get what she came for 8 | Ooh, ooh, and she's buying the stairway to heaven 9 | There's a sign on the wall but she wants to be sure 10 | Cause you know sometimes words have two meanings 11 | In a tree by the brook, there's a songbird who sings 12 | Sometimes all of our thoughts are misgiven 13 | 14 | [Chorus] 15 | Ooh, it makes me wonder 16 | Ooh, it makes me wonder 17 | 18 | [Verse 2] 19 | There's a feeling I get when I look to the west 20 | And my spirit is crying for leaving 21 | In my thoughts I have seen rings of smoke through the trees 22 | And the voices of those who stand looking 23 | 24 | [Chorus] 25 | Ooh, it makes me wonder 26 | Ooh, it makes me wonder 27 | 28 | [Verse 3] 29 | And it's whispered that soon if we all call the tune 30 | Then the piper will lead us to reason 31 | And a new day will dawn for those who stand long 32 | And the forests will echo with laughter 33 | 34 | [Verse 4] 35 | If there's a bustle in your hedgerow, don't be alarmed now 36 | It's just a spring clean for the May queen 37 | Yes, there are two paths you can go by, but in the long run 38 | There's still time to change the road you're on 39 | And it makes me wonder 40 | Your head is humming and it won't go, in case you don't know 41 | The piper's calling you to join him 42 | Dear lady, can you hear the wind blow, and did you know 43 | Your stairway lies on the whispering wind 44 | 45 | [Guitar Solo] 46 | 47 | [Bridge] 48 | And as we wind on down the road 49 | Our shadows taller than our soul 50 | There walks a lady we all know 51 | Who shines white light and wants to show 52 | How everything still turns to gold 53 | And if you listen very hard 54 | The tune will come to you at last 55 | When all are one and one is all 56 | To be a rock and not to roll 57 | 58 | [Outro] 59 | And she's buying the stairway to heaven 60 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/edits/november-rain1.txt: -------------------------------------------------------------------------------- 1 | When I look into your eyes 2 | I can see a love restrained 3 | But darlin' when I hold you 4 | Don't you know I feel the same 5 | 6 | Nothin' lasts forever 7 | And we both know hearts can change 8 | And it's hard to hold a candle 9 | In the cold April rain 10 | 11 | We've been through this such a long long time 12 | Just tryin' to kill the pain, oo yeah 13 | But love is always coming and love is always going 14 | And no one's really sure who's lettin' go today 15 | Walking away 16 | 17 | If we could take the time 18 | To lay it on the line 19 | I could rest my head 20 | Just knowin' that you were mine 21 | All mine 22 | So if you want to love me 23 | Then darlin' don't refrain 24 | Or I'll just end up walkin' 25 | In the cold Aprill rain 26 | 27 | Do you need some time on your own 28 | Do you need some time all alone 29 | Everybody needs some time 30 | On their own 31 | Don't you know you need some time all alone 32 | 33 | I know it's hard to keep an open heart 34 | When even friends seem out to harm you 35 | But if you could heal a broken heart 36 | Wouldn't time be out to charm you 37 | 38 | Sometimes I need some time on my 39 | Own 40 | Sometimes I need some time all alone 41 | Everybody needs some time 42 | On their own 43 | Don't you know you need some time all alone 44 | 45 | And when your fears subside 46 | And shadows still remain, oh yeah 47 | I know that you can love me 48 | When there's no one left to blame 49 | So never mind the darkness 50 | We still can find a way 51 | 'Cause nothin' lasts forever 52 | Even cold August rain 53 | 54 | Don't ya think that you need somebody 55 | Don't ya think that you need someone 56 | Everybody needs somebody 57 | You're not the only one 58 | You're not the only one 59 | 60 | Don't ya think that you need somebody 61 | Don't ya think that you need someone 62 | Everybody needs somebody 63 | You're not the only one 64 | You're not the only one 65 | 66 | Don't ya think that you need somebody 67 | Don't ya think that you need someone 68 | Everybody needs somebody 69 | You're not the only one 70 | You're not the only one 71 | 72 | Don't ya think that you need somebody 73 | Don't ya think that you need someone 74 | Everybody needs somebody 75 | -------------------------------------------------------------------------------- /GitHub-trainings/github-pr-training/jupyter-repo-setup/repo-content-files/lyrics/rock/november-rain.txt: -------------------------------------------------------------------------------- 1 | When I look into your eyes 2 | I can see a love restrained 3 | But darlin' when I hold you 4 | Don't you know I feel the same 5 | 6 | Nothin' lasts forever 7 | And we both know hearts can change 8 | And it's hard to hold a candle 9 | In the cold November rain 10 | 11 | We've been through this such a long long time 12 | Just tryin' to kill the pain, oo yeah 13 | But love is always coming and love is always going 14 | And no one's really sure who's lettin' go today 15 | Walking away 16 | 17 | If we could take the time 18 | To lay it on the line 19 | I could rest my head 20 | Just knowin' that you were mine 21 | All mine 22 | So if you want to love me 23 | Then darlin' don't refrain 24 | Or I'll just end up walkin' 25 | In the cold November rain 26 | 27 | Do you need some time on your own 28 | Do you need some time all alone 29 | Everybody needs some time 30 | On their own 31 | Don't you know you need some time all alone 32 | 33 | I know it's hard to keep an open heart 34 | When even friends seem out to harm you 35 | But if you could heal a broken heart 36 | Wouldn't time be out to charm you 37 | 38 | Sometimes I need some time on my 39 | Own 40 | Sometimes I need some time all alone 41 | Everybody needs some time 42 | On their own 43 | Don't you know you need some time all alone 44 | 45 | And when your fears subside 46 | And shadows still remain, oh yeah 47 | I know that you can love me 48 | When there's no one left to blame 49 | So never mind the darkness 50 | We still can find a way 51 | 'Cause nothin' lasts forever 52 | Even cold November rain 53 | 54 | Don't ya think that you need somebody 55 | Don't ya think that you need someone 56 | Everybody needs somebody 57 | You're not the only one 58 | You're not the only one 59 | 60 | Don't ya think that you need somebody 61 | Don't ya think that you need someone 62 | Everybody needs somebody 63 | You're not the only one 64 | You're not the only one 65 | 66 | Don't ya think that you need somebody 67 | Don't ya think that you need someone 68 | Everybody needs somebody 69 | You're not the only one 70 | You're not the only one 71 | 72 | Don't ya think that you need somebody 73 | Don't ya think that you need someone 74 | Everybody needs somebody -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/jupyter-repo-setup/repo-content-files/lyrics/rock/november-rain.txt: -------------------------------------------------------------------------------- 1 | When I look into your eyes 2 | I can see a love restrained 3 | But darlin' when I hold you 4 | Don't you know I feel the same 5 | 6 | Nothin' lasts forever 7 | And we both know hearts can change 8 | And it's hard to hold a candle 9 | In the cold November rain 10 | 11 | We've been through this such a long long time 12 | Just tryin' to kill the pain, oo yeah 13 | But love is always coming and love is always going 14 | And no one's really sure who's lettin' go today 15 | Walking away 16 | 17 | If we could take the time 18 | To lay it on the line 19 | I could rest my head 20 | Just knowin' that you were mine 21 | All mine 22 | So if you want to love me 23 | Then darlin' don't refrain 24 | Or I'll just end up walkin' 25 | In the cold November rain 26 | 27 | Do you need some time on your own 28 | Do you need some time all alone 29 | Everybody needs some time 30 | On their own 31 | Don't you know you need some time all alone 32 | 33 | I know it's hard to keep an open heart 34 | When even friends seem out to harm you 35 | But if you could heal a broken heart 36 | Wouldn't time be out to charm you 37 | 38 | Sometimes I need some time on my 39 | Own 40 | Sometimes I need some time all alone 41 | Everybody needs some time 42 | On their own 43 | Don't you know you need some time all alone 44 | 45 | And when your fears subside 46 | And shadows still remain, oh yeah 47 | I know that you can love me 48 | When there's no one left to blame 49 | So never mind the darkness 50 | We still can find a way 51 | 'Cause nothin' lasts forever 52 | Even cold November rain 53 | 54 | Don't ya think that you need somebody 55 | Don't ya think that you need someone 56 | Everybody needs somebody 57 | You're not the only one 58 | You're not the only one 59 | 60 | Don't ya think that you need somebody 61 | Don't ya think that you need someone 62 | Everybody needs somebody 63 | You're not the only one 64 | You're not the only one 65 | 66 | Don't ya think that you need somebody 67 | Don't ya think that you need someone 68 | Everybody needs somebody 69 | You're not the only one 70 | You're not the only one 71 | 72 | Don't ya think that you need somebody 73 | Don't ya think that you need someone 74 | Everybody needs somebody -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/jupyter-repo-setup/repo-content-files/lyrics/pop/dont-stop-me-now.txt: -------------------------------------------------------------------------------- 1 | Tonight, I'm gonna have myself a real good time 2 | I feel alive and the world I'll turn it inside out, yeah 3 | And floating around in ecstasy 4 | So don't stop me now don't stop me 5 | 'Cause I'm having a good time, having a good time 6 | 7 | I'm a shooting star, leaping through the sky 8 | Like a tiger defying the laws of gravity 9 | I'm a racing car, passing by like Lady Godiva 10 | I'm gonna go, go, go 11 | There's no stopping me 12 | 13 | I'm burnin' through the sky, yeah 14 | Two hundred degrees 15 | That's why they call me Mister Fahrenheit 16 | I'm traveling at the speed of light 17 | I wanna make a supersonic man out of you 18 | 19 | Don't stop me now, I'm having such a good time 20 | I'm having a ball 21 | Don't stop me now 22 | If you wanna have a good time, just give me a call 23 | Don't stop me now ('cause I'm having a good time) 24 | Don't stop me now (yes, I'm havin' a good time) 25 | I don't want to stop at all 26 | 27 | Yeah, I'm a rocket ship on my way to Mars 28 | On a collision course 29 | I am a satellite, I'm out of control 30 | I am a sex machine, ready to reload 31 | Like an atom bomb about to 32 | Oh, oh, oh, oh, oh explode 33 | 34 | I'm burnin' through the sky, yeah 35 | Two hundred degrees 36 | That's why they call me Mister Fahrenheit 37 | I'm traveling at the speed of light 38 | I wanna make a supersonic woman of you 39 | 40 | Don't stop me, don't stop me 41 | Don't stop me, hey, hey, hey 42 | Don't stop me, don't stop me 43 | Ooh ooh ooh, I like it 44 | Don't stop me, don't stop me 45 | Have a good time, good time 46 | Don't stop me, don't stop me, ah 47 | Oh yeah 48 | Alright 49 | 50 | Oh, I'm burnin' through the sky, yeah 51 | Two hundred degrees 52 | That's why they call me Mister Fahrenheit 53 | I'm traveling at the speed of light 54 | I wanna make a supersonic man out of you 55 | 56 | Don't stop me now, I'm having such a good time 57 | I'm having a ball 58 | Don't stop me now 59 | If you wanna have a good time (wooh) 60 | Just give me a call (alright) 61 | Don't stop me now ('cause I'm having a good time, yeah yeah) 62 | Don't stop me now (yes, I'm havin' a good time) 63 | I don't want to stop at all 64 | 65 | La da da da daah 66 | Da da da haa 67 | Ha da da ha ha haaa 68 | Ha da daa ha da da aaa 69 | Ooh ooh ooh 70 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Observer/jupyter-repo-setup/repo-content-files/README.md: -------------------------------------------------------------------------------- 1 | # Intro to Git and GitHub training - Observer training 2 | 3 | This repository was created for a training session of [DIME Analytics](https://www.worldbank.org/en/research/dime/data-and-analytics) *Intro to Git and GitHub Training - Observer*. You can read more about DIME Analytics Git and GitHub trainings [here](https://github.com/worldbank/dime-github-trainings). 4 | 5 | This is one of two beginner trainings. This one is for *Observers*: users that browse and provide feedback to code hosted in GitHub, but do not make code contributions. You can read more about Observers role and other roles in DIME Analytics [Suggested GitHub Project Roles](https://github.com/worldbank/dime-github-trainings/blob/master/GitHub-resources/DIME-GitHub-Roles/DIME-GitHub-roles.md). 6 | 7 | We hope you will find Git and GitHub as useful as we do! 8 | 9 | ## Content of this repository 10 | 11 | This repository contains a country-fact file. Many of these facts are incorrect, intentionally, as this training teaches how to use GitHub to provide feedback on content that is wrong and needs to be updated. The country facts were written by the members of DIME Analytics at the time of creating this training; we like to make fun of ourselves and the places we are from. 12 | 13 | We do not use code in our trainings as not everyone attending our trainings uses the same programming language, and code that is unfamiliar to you is distracting. Instead, we use this country-fact file, to teach the GitHub features you will use on code in the future, without getting distracted by code during the training. 14 | 15 | ## Doing this training on your own 16 | 17 | This training was developed to be an interactive training taught by an instructor, but we are happy to share all material. If you are not participating in an in-person session and want to do this training on your own, go to [DIME Analytics GitHub training repo](https://github.com/worldbank/dime-github-trainings). There, you find the [LaTeX](https://github.com/worldbank/DIME-LaTeX-Templates) code to generate the slides used in this training, and the jupyter notebook code that you can run to create your own copy of this repository that you can interact with. 18 | 19 | ## Contact 20 | 21 | If you have any questions about this training, please email us at dimeanalytics@worldbank.org 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # 3 | # Based on DIME .gitignore template. Follow the instructions in the URL 4 | # below to set up this template in your own repository 5 | # https://github.com/worldbank/DIMEwiki/tree/master/Topics/GitHub 6 | # 7 | # Note that if you are using GitKraken, you need to use version 5.x or more 8 | # recent for this template to work properly 9 | # 10 | ######################################################################## 11 | 12 | ####################### 13 | # Start by ignoring everything, and below we are explicitly saying 14 | # what to not ignore 15 | * 16 | 17 | ####################### 18 | # List of files with GitHub functionality anywhere in the repo 19 | # that we do not want to ignore 20 | 21 | # These files include GitHub settings 22 | !.gitignore 23 | !.gitattributes 24 | 25 | # Keep markdown files used for documentation on GitHub 26 | !README.md 27 | !CONTRIBUTING.md 28 | !LICENSE.* 29 | 30 | ####################### 31 | # For performance reasons, if a folder is already ignored, then 32 | # GitHub does not check the content for that folder for matches 33 | # with additional rules. The line below includes folder in the 34 | # top folder (but not their content), so that anything matching 35 | # the rules below will still not be ignored. 36 | !*/ 37 | 38 | ####################### 39 | # The following file types are code that should always be 40 | # included no matter where in the repository folder they are 41 | # located unless you explicitly ignore that folder 42 | 43 | # Stata 44 | !/**/*.do 45 | !/**/*.ado 46 | 47 | # R 48 | !/**/*.R 49 | !/**/*.Rmd 50 | !/**/*.Rproj 51 | 52 | # LaTeX 53 | !/**/*.tex 54 | 55 | # Python 56 | !/**/*.py 57 | !/**/*.ipynb 58 | # Ignore .ipynb files in checkpoint folders 59 | .ipynb_checkpoints 60 | 61 | # Matlab 62 | !/**/*.m 63 | 64 | # Markdown 65 | !/**/*.md 66 | !/**/*.qmd 67 | 68 | ####################### 69 | # Un-ignore all files needed for quarto templates 70 | !**/_extensions/**/*.* 71 | 72 | # Text files 73 | !/**/*.txt 74 | 75 | ####################### 76 | #Un-ignore all png files directly in a folder called /img/ 77 | !**/img/*.png 78 | 79 | ####################### 80 | #Un-ignore all files needed when setting up the training repositories 81 | !**/repo-content-files/**/*.* 82 | !**/repo-content-files/no.gitignore 83 | !**/repo-content-files/README.md 84 | 85 | ####################### 86 | #Ignore everything in the token folder apart from the README.md placeholder 87 | 88 | GitHub-trainings/Common-Resources/token/* 89 | !GitHub-trainings/Common-Resources/token/README.md 90 | -------------------------------------------------------------------------------- /GitHub-trainings/README.md: -------------------------------------------------------------------------------- 1 | # DIME GitHub Trainings 2 | 3 | These trainings are all developed under the MIT License meaning that anyone can use these trainings for any purpose, including commercial. You may also modify these trainings before using them, but we would appreciate if you shared your suggested improvement. Either in an issue in this repository, or by sending us an email at dimeanalytics@worldbank.org. 4 | 5 | While you are free to use this material as you see fit, most of this material is not developed as self-teaching material and might not make sense without in-person instructions. Although, even though it *might* not be useful we still want to share it in case it is not. If you want us to organize a training for you or your team, please reach out to us at dimeanalytics@worldbank.org and we will see if we are able to accommodate that. 6 | 7 | ## Content 8 | 9 | All trainings come with LaTeX code to generate slides, and python code to generate test repositories. 10 | 11 | If you are following these trainings by yourself we have provided code you can use to re-create the training repositories. The Jupyter Notebook code that uses the GitHub API to create the training repositories can also be found in this repository. See each training for more details. 12 | 13 | ## The different trainings 14 | 15 | We will continuously develop more resources based on the demand from the teams within DIME. These are the current state of our GitHub training portfolio: 16 | 17 | ### Existing trainings 18 | * **Intro-Git-GitHub-Contributor** - This training require no previous experience and will teach the attendee to explore and contribute to a code hosted in Git/GitHub using GitHub.com and GitHub Desktop. 19 | * **Intro-Git-GitHub-Observer** - This training require no previous experience and will teach the attendee to explore and provide feedback on code hosted in Git/GitHub using GitHub.com. 20 | * **GitHub Team Maintainer Training** - Access to repos in an organizational account on GitHub is controlled using GitHub's Teams feature. This training introduces the DIME Team Maintainers to what the DIME Acccount Admins expect from them. 21 | 22 | ### Possible future trainings 23 | 24 | * **GitBetter** - This training can be self-taught and is aimed towards someone who comfortable using the basics of Git/GitHub and want to start having a deeper understanding how Git works and how GitHub is implemented, and how to use that understanding to be a better *Contributor* and eventually an excellent *Repo maintainer*. 25 | * **Git-GitHub-Repo-maintainer** - This training trains the attendee in things necessary for be someone who is responsible to set up and uphold the work flow for a project hosted in Git. 26 | -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Guides/github-childteam-access.md: -------------------------------------------------------------------------------- 1 | # Child team access management 2 | 3 | This page is a guide to how you can use teams, child teams, and child teams of child teams access to control access to your repositories in a very granular way. We strongly recommend that this granular set-up is only used when necessary, as our experience is that this tends to get outdated quite quickly. But if you want to do this, then please read the guide below. 4 | 5 | ## General example 6 | 7 | The image below is an example set-up that explains the main rules how access is inherited between parent teams and child teams on GitHub.com. Black boxes are teams, green boxes indicate which repos those teams are added to, and grey boxes are users that are added as members to the teams. So `Team Parent` has one member (`User A`) and is added to one repo (`repo-p1`). 8 | 9 | The team "_Team Child_" is a child team of "_Team Parent_" and the two grandchild teams are both added as child teams directly to "_Team Child_" as the arrows indicate. 10 | 11 | Child teams have access to repos of the parent team but not the other way around. Some examples of what that means: 12 | * `User A` does not have access to `repo-gx1` as `User A` is only added to `Team Parent` but `User C` has access to `repo-p1` even though it is only added to `Team Grandchild X` 13 | * In this example there is no difference to be added to `Team Parent` and `Team Child` meaning that `User A` and `User B` has the same type of access 14 | * `User A` and `User B` does not have access to any of the repos `repo-gx1`, `repo-gy1` or `repo-gy2` 15 | * All users in this example have access to the repository `repo-p1` since all users in this example are members of either `Team Parent` or a child team of `Team Parent` 16 | * `User E` is added as a member to both `Team Grandchild X` and `Team Grandchild Y` and therefore has access to all repositories in this example 17 | 18 | --- 19 | 20 | ![github-access-child-team](https://user-images.githubusercontent.com/15911801/73011151-b01f5200-3de1-11ea-960a-e59fbfa7475f.png) 21 | 22 | --- 23 | 24 | #### Different types of access 25 | 26 | One aspect not mentioned in the image above is that there are different types of access to a repository. There is _read_ access where a user can only see the files, and there is _write_ access where a user can both see and modify files. 27 | 28 | Here is one way that can be used. Let's assume that all green boxes indicate _write_ access in the image above. If desired, then the team `Team Child` can be added with _read_ access to the repos `repo-gx1`, `repo-gy1` or `repo-gy2`, meaning that all users but `User A` have read access to those three repos as child teams inherit parent teams' access. 29 | 30 | If a user has both _read_ and _write_ access then the higher level of access, i.e. _write_, applies. So, for example, if `Team Child` is given _read_ access to the repos `repo-gx1`, `repo-gy1` or `repo-gy2`, then `User C` has _write_ access to repos `repo-p1` and `repo-gx1` as before, but also _read_ access to repos `repo-gy1` and `repo-gy2`. 31 | -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Templates/placeholder-README.md: -------------------------------------------------------------------------------- 1 | # Placeholder file 2 | 3 | This file has been created automatically by the command **iegitaddmd** from the Stata package [**ietoolkit**](https://worldbank.github.io/ietoolkit) to make GitHub sync this folder. GitHub does not sync empty folders or folders that only contain ignored files, but in research projects it is often important to share the full standardized folder structure along with the actual files. This command is intended to be used with **iefolder**, but it can be used in any folder structure intended to be shared on GitHub. 4 | 5 | In recently started projects, it is typical to create data folders, script folders (do-files, r-files) and output folders, among others. The output folders are initially empty, but the script files might include a file path to them for later use. If an output folder is empty and another collaborator clones the repository, then the output folder expected by the scripts will not be included by GitHub in the cloned repository, and the script will not run properly. 6 | 7 | ## You should replace the content of this placeholder file 8 | 9 | The text in this file should be replaced with text that describes the intended use of this folder. This file is written in markdown (.md) format, which is suitable for GitHub syncing (unlike .doc/.docx). If the file is named *README.md*, GitHub automatically displays its contents when someone navigates to the containing folder on GitHub.com using a web browser. 10 | 11 | If you are new to markup languages (markdown, html etc.) then this [Markdown Tutorial](https://www.markdowntutorial.com/) is a great place to start. If you have some experience with markup languages, then this [Markdown Cheat Sheet](https://guides.github.com/pdfs/markdown-cheatsheet-online.pdf) is a great resource. 12 | 13 | ## Add similar files in other folders 14 | 15 | The Stata command **iegitaddmd** does not add anything to folders that already have content unless this is explicitly requested using the option `all`. It is best practice to create a *README.md* file in any folders that have content, for example, in folders which purpose might not obvious to someone using the repository for the first time. Again, if the file is named *README.md*, then the content of the file will be shown in the browser when someone explores the repository on GitHub.com. This is a very good way to document your code and your data work. 16 | 17 | Another great use of a *README.md* file is to use it as a documentation on how the folder it sits in and its subfolders are organized, where its content can be found, and where new content is meant to be saved. For example, if you have a folder called `/Baseline/`, then you can give a short description of the activities conducted during the baseline and where data, scripts and outputs related to it can be found. 18 | 19 | ## Removing this file 20 | 21 | Our recommendation is to not remove this file, as GitHub may stop syncing the parent folder unless the folder now has other content. We recommend to not even remove this file when content that is committed to this repository is added to this folder and the file can be removed without breaking the GitHub functionality, as it is better practice to replace the content of this file with content describing this specific folder rather than deleting it. 22 | 23 | -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Templates/gitignore_template.txt: -------------------------------------------------------------------------------- 1 | ######################################################################## 2 | # 3 | # Based on DIME .gitignore template. Follow the instructions in the URL 4 | # below to set up this template in your own repository 5 | # https://github.com/worldbank/dime-github-trainings/tree/main/GitHub-resources/DIME-GitHub-Templates 6 | # 7 | # This is version 2.0 8 | # 9 | ######################################################################## 10 | 11 | ####################### 12 | # Start by ignoring everything, and below we are explicitly saying 13 | # what to not ignore 14 | * 15 | 16 | ####################### 17 | # List of files with GitHub functionality anywhere in the repo 18 | # that we do not want to ignore 19 | 20 | # These files include GitHub settings 21 | !.gitignore 22 | !.gitattributes 23 | 24 | # Git placeholder file (to commit empty folders) 25 | !/**/*.gitkeep 26 | 27 | # Keep markdown files used for documentation on GitHub 28 | !README.md 29 | !CONTRIBUTING.md 30 | !LICENSE* 31 | 32 | * Unignore reproot files - see https://dime-worldbank.github.io/repkit/articles/reproot-files.html 33 | !reproot*.yaml 34 | 35 | ####################### 36 | # For performance reasons, if a folder is already ignored, then 37 | # GitHub does not check the content for that folder for matches 38 | # with additional rules. The line below includes folder in the 39 | # top folder (but not their content), so that anything matching 40 | # the rules below will still not be ignored. 41 | !*/ 42 | 43 | ####################### 44 | # The following file types are code that should always be 45 | # included no matter where in the repository folder they are 46 | # located unless you explicitly ignore that folder 47 | 48 | # Stata 49 | !/**/*.do 50 | !/**/*.ado 51 | !/**/*.sthlp 52 | !/**/*.smcl 53 | 54 | # R 55 | !/**/*.R 56 | !/**/*.Rmd 57 | !/**/*.Rproj 58 | !/**/*.qmd 59 | # Still ignore user file for R projects 60 | .Rproj.user 61 | 62 | # LaTeX 63 | !/**/*.tex 64 | !/**/*.bib 65 | 66 | # Python 67 | !/**/*.py 68 | !/**/*.ipynb 69 | !/**/requirements.txt 70 | !/**/Pipfile 71 | !/**/Pipfile.lock 72 | # Still ignore .ipynb files in checkpoint folders 73 | .ipynb_checkpoints 74 | 75 | # Matlab 76 | !/**/*.m 77 | 78 | # Markdown 79 | !/**/*.md 80 | 81 | # Julia 82 | !/**/*.jl 83 | 84 | #Files to create custom layout and functionality 85 | # in dashboards, markdown notebooks, bookdown etc. 86 | !/**/*.css 87 | !/**/*.js 88 | 89 | #Bash scripts 90 | !/**/*.sh 91 | 92 | # .yml and .yaml files 93 | # These files sometimes have credentials, so only unignore these lines by removing 94 | # the "#" below after you checked your .yml/.yaml files for sensitive content 95 | #!/**/*.yml 96 | #!/**/*.yaml 97 | 98 | ####################### 99 | # Include some additional file formats in any output folder. You might have 100 | # to change the name of the Output folder to whatever it is called in your 101 | # project, but we strongly recommend that you only include these files in 102 | # a subset of the folders where you are certain no private data is ever stored. 103 | !/**/Output/**/*.txt 104 | !/**/Output/**/*.csv 105 | !/**/Output/**/*.xml 106 | !/**/Output/**/*.eps 107 | !/**/Output/**/*.svg 108 | 109 | ####################### 110 | # Include all the files with passwords or tokens here. All files named 111 | # password or passwords are with this template ignored no matter which 112 | # format you are using. Additionally, all content in any folder called 113 | # password or passwords are also ignored. NOTE that your project might be 114 | # using different names and then you must edit the lines below accordingly. 115 | password.* 116 | passwords.* 117 | password/ 118 | passwords/ 119 | token.* 120 | tokens.* 121 | token/ 122 | tokens/ 123 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/Training-Preperations-Contributor.md: -------------------------------------------------------------------------------- 1 | # Preparations – Intro to Git/GitHub Contributor Training 2 | 3 | ## Participator 4 | 5 | All participants are expected to complete the steps below *before* the training. This is an interactive session, so it is essential that everyone follows these instructions and brings their laptop to the training. 6 | 7 | 1. If you do not already have a GitHub account, please follow [these best-practice instructions](https://github.com/worldbank/dime-github-trainings/blob/master/GitHub-resources/DIME-GitHub-Guides/Creating-GitHub-account.md) to sign up. 8 | If you already have a GitHub account, you do **not** need to create a separate one for your WB work. 9 | (See the best-practice guide for details on using a single account for both personal and professional use.) 10 | 11 | 2. Send your GitHub username to the organizer or instructor of your training session. 12 | (If you provided your username when signing up via a form, you do not need to send it again.) 13 | The instructor will invite you to the training repository. 14 | - _Do not send the email address associated with your GitHub account, we need your username. Your username is in the URL to your proile page on GitHub.com, so if unsure, you can alsways share that URL._ 15 | 16 | 4. Install the GitHub Desktop application. This is a free GitHub client approved for WB computers. 17 | While other clients exist, this training uses GitHub Desktop because it is the most beginner-friendly option. 18 | - **Personal computer**: [Download GitHub Desktop here](https://desktop.github.com/) 19 | - **WB computer**: Open *Software Center* from the Windows Start menu. Search for **GitHub Desktop** and click **Install**. 20 | 21 | 5. After installing GitHub Desktop, open it and go to _File_ → _Options_, then log in using your GitHub account. 22 | - _Optional_: Go to _Help_ → _About GitHub Desktop_ to check for updates. 23 | (*Software Center* may not install the latest version. GitHub Desktop will regardless evenutally update itself automatically.) 24 | 25 | 6. Accept the invitation to the training repository sent by your instructor (see Step 2). 26 | 27 | 7. Bring the laptop with GitHub Desktop installed to the training session. 28 | 29 | ## Organizer 30 | 31 | #### When planning the training: 32 | 33 | * If people are attending remotely: Set up a 120 min call using any of the Teams, Zoom, WebEx etc. 34 | * If people are attending in person: Make sure that the room is a VC room with a screen 35 | * If people are attending both remotely and in person, do both of the above! 36 | * Send the link to this page to all participants asking them to follow the _Participator_ instructions. Copy the instructor in that email. 37 | 38 | #### A day or two before the training: 39 | 40 | * Make sure that all participants has a GitHub account and has the Git Client GitHub Desktop installed. 41 | * Make sure that you have forwarded to the instructor all the GitHub account names that participants have sent to you. 42 | * Make sure that all participants are aware that this is an interactive training where it only make sense if everyone brings their own computer to the training. 43 | 44 | ## Instructor 45 | 46 | #### When planning the training: 47 | 48 | * Send this page to the organizer of the training if that is a different person than the instructor. 49 | 50 | #### A day or two before the training: 51 | 52 | * Run the jupyter notebook code to set up the training repo 53 | * Invite all participants to the training repo 54 | 55 | #### Day of training: 56 | 57 | * Check how many people accepted the invitation. If almost all accepted, then follow up at beginning of training, otherwise follow up by email as too much time will be spent doing this at the training. 58 | * Make sure that you do not have the test repo, or another repo with the same name, already cloned to your computer 59 | -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Guides/Creating-GitHub-account.md: -------------------------------------------------------------------------------- 1 | # Creating a GitHub account 2 | 3 | Creating an account is easy. You can do so by following [this link](https://github.com/join), but we recommend that you read through the best practices below first. 4 | 5 | ## Best practice creating account 6 | 7 | 1. **Use a private email address** - We have had colleagues who has lost access to their GitHub account after losing access to work email when changing jobs, so use a personal email when you create your account. This will be your primary email. You can later add your work email and have any notifications from work repositories sent to that email. 8 | 9 | 2. **No need for multiple accounts** - Most people use the same account, even when working for different organization or for personal projects like hosting a web site. So, if you already have a GitHub account, there is no need to create a second one. 10 | 11 | ## Best practice settings 12 | 13 | Here are some optional settings that we have found to be helpful to teams to be productive on GitHub: 14 | 15 | ### Profile picture 16 | Let's not turn GitHub into another social media platform, but there is one good reason why everyone should replace the automatically generated profile picture with a picture of their choice. Note that the picture of choice does not need to be a picture of the user, it can be a pic of a pet, a cartoon, a nature image or anything else that is unique among all other users you are working with. 17 | 18 | Once a team is actively using GitHub to manage a research project it will be much faster to scan through discussions and commit histories if everyone uses a profile picture unique to them. This will increase the productivity in the team, especially for managers and repo maintainers that need to keep an overview of what is going on and who is doing what in a repo. 19 | 20 | To update your profile picture, go to https://github.com/settings/profile in a browser where you are logged in to github.com. 21 | 22 | ### Notifications 23 | In this digital age, very few things are more annoying than more notifications. You can turn off all notifications but we strongly encourage you to not turn off all notification and instead learn how you control your notifications. 24 | 25 | ##### Watching 26 | Each repository has notification settings. You can see the options by clicking the _Watching_ button at the top of the repo page. You can there customize your notifications for each repo there. Be careful to ignore all notifications as you might miss information, but feel free to set the settings to get fewer notification than the default value. 27 | 28 | 29 | ##### Send notification to work repositories to your work email 30 | 31 | If you used a private email (as we recommended) when you sat up your GitHub account you can add your work email as your second email. Then you can tell GitHub to send all notifications from repositories hosted at your employer's organization account to be sent to that email. 32 | 33 | To do that, follow these steps. 34 | 35 | * **Add a second email** 36 | 1. Go to https://github.com/settings/profile in a browser where you are logged in to github.com 37 | 1. Click emails in the menu (or click here https://github.com/settings/emails) 38 | 1. In the field that says _Add email address_ enter the email you want to add as your second email. An email will be sent to that address with instructions for how to confirm that you own that email. Complete those instructions before doing next step. 39 | * **Set up notification for the second email** 40 | 1. After you have added a second email, click _Notifications_ in the settings menu and then click _Custom Routing_ (or click here https://github.com/settings/notifications/custom_routing, link only works if you are logged in to GitHub.com). 41 | 1. Select the origanization accounts for which you want notifications sent to your second email. Any notification for any repo or project hosted on the account you select for the second email will be sent to that email. 42 | -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/setup_dime_palettes.R: -------------------------------------------------------------------------------- 1 | #' Complete list of palettes 2 | #' 3 | #' Use \code{\link{dime_palette}} to construct palettes of desired length. 4 | #' 5 | #' @export 6 | dime_palettes <- list("DIME" = c("Dark" = "#07202E", 7 | "MediumDark" = "#296586", 8 | "Medium" = "#4090BE", 9 | "MediumLight" = "#66BDE6", 10 | "Light" = "#B7DEF3"), 11 | "Purple" = c("Dark" = "#892C90", 12 | "MediumDark" = "#9854A2", 13 | "Medium" = "#AC78B5", 14 | "MediumLight" = "#C39FCA", 15 | "Light" = "#DECCE3"), 16 | "Green" = c("Dark" = "#07AB54", 17 | "MediumDark" = "#3DB76E", 18 | "Medium" = "#7AC690", 19 | "MediumLight" = "#A6D7B0", 20 | "Light" = "#D1EAD5"), 21 | "Blue" = c("Dark" = "#30689E", 22 | "MediumDark" = "#4090BE", 23 | "Medium" = "#5DACD2", 24 | "MediumLight" = "#66BDE6", 25 | "Light" = "#B7DEF3"), 26 | "Orange" = c("Dark" = "#F68D28", 27 | "MediumDark" = "#F9A254", 28 | "Medium" = "#FBB87A", 29 | "MediumLight" = "#FDCFA2", 30 | "Light" = "#FEE4CC"), 31 | "Turquoise" = c("Dark" = "#00A997", 32 | "MediumDark" = "#01B5A9", 33 | "Medium" = "#5AC4BB", 34 | "MediumLight" = "#97D5CE", 35 | "Light" = "#CAE9E5")) 36 | 37 | #' An DIME palette generator 38 | #' 39 | #' These are a few color palettes useful for members of the World Bank. 40 | #' This function calls one of three official palettes in 41 | #' \code{\link{dime_palette}}. 42 | #' 43 | #' @param n Number of colors desired. If omitted, uses all colours. 44 | #' @param name Name of desired palette. Current choices are: 45 | #' \code{DIME}, \code{Purple}, \code{Green}, \code{Blue}, \code{Orange}, and \code{Turquoise}. 46 | #' @param type Either "continuous" or "discrete". Use continuous if you want 47 | #' to automatically interpolate between colors. 48 | #' @importFrom graphics rect par image text 49 | #' @return A vector of colors. 50 | #' @source Adapted from 51 | #' \url{https://github.com/karthik/wesanderson/blob/master/R/colors.R} 52 | #' @export 53 | #' @keywords colors 54 | #' @examples 55 | #' dime_palette("DIME") 56 | #' dime_palette("Purple") 57 | #' dime_palette("Orange") 58 | #' 59 | #' # If you need more colors than normally found in a palette, you 60 | #' # can use a continuous palette to interpolate between existing 61 | #' # colors 62 | #' pal <- dime_palette(21, name = "DIME", type = "continuous") 63 | #' image(volcano, col = pal) 64 | dime_palette <- function(name, n, type = c("discrete", "continuous")) { 65 | type <- match.arg(type) 66 | pal <- dime_palettes[[name]] 67 | if (is.null(pal)) 68 | stop("Palette not found.") 69 | if (missing(n)) { 70 | n <- length(pal) 71 | } 72 | if (type == "discrete" && n > length(pal)) { 73 | stop("Number of requested colors greater than what palette can offer") 74 | } 75 | out <- switch(type, 76 | continuous = grDevices::colorRampPalette(pal)(n), 77 | discrete = pal[1:n] 78 | ) 79 | structure(out, class = "palette", name = name) 80 | } 81 | 82 | #' @export 83 | #' @importFrom graphics rect par image text 84 | #' @importFrom grDevices rgb 85 | print.palette <- function(x, ...) { 86 | n <- length(x) 87 | old <- par(mar = c(0.5, 0.5, 0.5, 0.5)) 88 | on.exit(par(old)) 89 | image(1:n, 1, as.matrix(1:n), col = x, 90 | ylab = "", xaxt = "n", yaxt = "n", bty = "n") 91 | rect(0, 0.9, n + 1, 1.1, col = rgb(1, 1, 1, 0.8), border = NA) 92 | text((n + 1) / 2, 1, labels = attr(x, "name"), cex = 1, family = "serif") 93 | } -------------------------------------------------------------------------------- /GitHub-trainings/Git-Better/latex-slides/Git-Better.tex: -------------------------------------------------------------------------------- 1 | % ---------------------------- Preamble starts here ---------------------------- 2 | 3 | \documentclass[aspectratio=169]{beamer} %Remove [aspectratio=169] to get non-wide 4:3 slide aspect ratio 4 | 5 | % --- Set beamer theme 6 | \usetheme{Metropolis} 7 | \setbeamertemplate{footline}{} % Remove automatic footer 8 | \setbeamertemplate{navigation symbols}{} % Comment this line to display navigation symbols 9 | 10 | % Load i2i symbol 11 | \addtobeamertemplate{frametitle}{}{% 12 | \begin{textblock*}{\linewidth}(0cm,7.4cm) % Replace with (0cm, 8cm) if using non-wide slide aspect 13 | \includegraphics[width=\linewidth]{../img/Footer.png} 14 | \end{textblock*}} 15 | 16 | % --- Load packages 17 | \usepackage{textpos} % To align objects correctly 18 | \usepackage{multicol} % To right in multiple columns 19 | \usepackage{color} % To color text 20 | 21 | % --- Add your information here 22 | \title{Git Better - Understanding Git and GitHub} 23 | \author{DIME Analytics} 24 | \institute{DIME - The World Bank - \trainingURL{https://www.worldbank.org/en/research/dime}} 25 | \date{\today} 26 | 27 | \newcommand{\repoUserAndName}{kbjarkefur/lyrics} 28 | \newcommand{\trainingRepoURL}[1]{\url{github.com/\repoUserAndName #1} } 29 | \newcommand{\trainerEmail}{\url{kbjarkefur@worldbank.org} } 30 | 31 | % ---------------------------- Preamble ends here ---------------------------- 32 | 33 | \begin{document} 34 | 35 | \begin{frame} 36 | \includegraphics[width=\textwidth]{../img/Header.png} 37 | \vspace{-0.2cm} 38 | \titlepage % Opening slide, prints inform 39 | \end{frame} 40 | 41 | 42 | \begin{frame} 43 | \frametitle{Git Better} 44 | The goal of this training: 45 | 46 | \begin{enumerate} 47 | \item Better understand the practices we recommend so that you can use them even better 48 | \item Not having to rely as much on DIME Analytics for 49 | \begin{itemize} 50 | \item Understanding why something is happening 51 | \item Solve errors or warnings 52 | \item Setting up or customizing your own work flows 53 | \end{itemize} 54 | \end{enumerate} 55 | \end{frame} 56 | 57 | \begin{frame} 58 | \frametitle{Content} 59 | Four sections: 60 | 61 | \begin{enumerate} 62 | \item Git vs. GitHub 63 | \item Knowing Git better 64 | \item Knowing GitHub better 65 | \item Work flows 66 | \end{enumerate} 67 | \end{frame} 68 | 69 | \section{Git vs. GitHub} 70 | 71 | \begin{frame} 72 | \frametitle{Git features and GitHub features} 73 | \begin{columns}[c] 74 | 75 | \column{.35\textwidth} % Left column and width 76 | It is important to start to think about which features comes from Git and which comes from your Git implementation, i.e. GitHub 77 | \vspace{.5cm} 78 | 79 | Git clients do not tend to add new features. Clients mostly differ in how features are displayed 80 | \column{.65\textwidth} % Right column and width 81 | \begin{figure} 82 | \centering 83 | \includegraphics[width=1\linewidth]{../img/git_github_gitclient_gitclient} 84 | \label{fig:finaldoccartoon} 85 | \end{figure} 86 | \end{columns} 87 | \end{frame} 88 | 89 | 90 | \begin{frame} 91 | \frametitle{Git features and GitHub features} 92 | 93 | \begin{itemize} 94 | \item Features from Git itself changes very little. Updates that affects how we work with Git are very rare 95 | \item Features from GitHub changes a lot. While most changes are minor, they regularly change how some feature works. 96 | \end{itemize} 97 | 98 | When setting up your work flow it is ok if your project depends on features in Git, but if your project and its work flow depends too much on features in GitHub you run a risk to wake up one day. Use the features in GitHub, they are great, just make sure to not depend on them. 99 | 100 | \end{frame} 101 | 102 | \begin{frame} 103 | \frametitle{Git features and GitHub features} 104 | 105 | \begin{itemize} 106 | \item DIME Analytics take this difference when we recommend work flows to teams 107 | \item And that is why this training are structured by first going over Git Features, and then GitHub Features 108 | \end{itemize} 109 | \end{frame} 110 | 111 | \section{Know Git Better} 112 | 113 | \section{Know GitHub Better} 114 | 115 | \section{Work flow} 116 | 117 | \end{document} 118 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/jupyter-repo-setup/repo-content-files/README.md: -------------------------------------------------------------------------------- 1 | # Intro to Git and GitHub training - Contributor 2 | 3 | This repository was created for a training session of 4 | [DIME Analytics](https://www.worldbank.org/en/research/dime/data-and-analytics) 5 | *Intro to Git and GitHub Training - Contributor*. 6 | You can read more about DIME Analytics Git and GitHub trainings 7 | [here](https://github.com/worldbank/dime-github-trainings). 8 | 9 | This is one of two beginner trainings. 10 | This one is for *Contributors*: 11 | people that will make code contributions and provide feedback using Git/GitHub. 12 | You can read more about Contributors and other roles in DIME Analytics 13 | [Suggested GitHub Project Roles](https://github.com/worldbank/dime-github-trainings/blob/master/GitHub-resources/DIME-GitHub-Roles/DIME-GitHub-roles.md). 14 | 15 | ## About this training 16 | 17 | This training targets both absolute beginners and people with some Git/GitHub experience 18 | who want to learn best practices for contributing to a project using Git/GitHub. 19 | This training will not teach you everything about Git and GitHub, 20 | but after this training you will know how to contribute to a repository. 21 | 22 | The training is designed for someone joining a team that is already using Git/GitHub, 23 | or that is about to start, and has a team member that is experience with GitHub workflows. 24 | This training will not teach you how to create a repository, 25 | how to set up work flows and best practices for a team using Git/GitHub, 26 | or how to solve conflicts etc. in a repository. 27 | However, you will be able to figure out most of them yourself after this training, 28 | if you are willing to use Google a little bit. 29 | 30 | We hope you like Git as much as we do! 31 | 32 | ## Content in this repository 33 | 34 | While Git/GitHub is a tool primarily for code development, 35 | there will be no code during this training. 36 | In our experience, code distracts participants 37 | (as they want to find out what it is trying to do), 38 | and the training applies regardless of intended programming language. 39 | So this training is 100% programming language agnostic 40 | and has no requirement of coding skills. 41 | 42 | Instead we will create an archive of great song lyrics. 43 | We will add lyrics to this repository in .txt files. 44 | We use that file format as it will behave the same way as any code file, 45 | but without distracting us. 46 | 47 | ## Doing this training on your own 48 | 49 | This training was developed to be an interactive training taught by an instructor, 50 | but we are happy to share all material. 51 | You can find all the materials used in this training on the 52 | [DIME Analytics GitHub training repo](https://github.com/worldbank/dime-github-trainings). 53 | This repo also include the material for all our other GitHub trainings and resources. 54 | 55 | **Slides**. Go to the 56 | [latex-slides folder](https://github.com/worldbank/dime-github-trainings/tree/main/GitHub-trainings/Intro-Git-GitHub-Contributor/latex-slides) 57 | to find the LaTeX code used to generate the slides used in this training. 58 | Read more about LaTeX in our 59 | [LaTeX guidelines](https://github.com/worldbank/DIME-LaTeX-Templates). 60 | 61 | **Training repo**. There are two ways you can recreate 62 | an identical copy of how this repo looks at the beginning of this training. 63 | If you are following a recording of this training and want to follow along, 64 | then this is what you need to do. 65 | 66 | 1. The easiest way is to 67 | [import a copy of the repo](https://docs.github.com/en/get-started/importing-your-projects-to-github/importing-source-code-to-github/importing-a-repository-with-github-importer) 68 | to your account. 69 | If you want a clean copy of the repo, make sure to use this URL: 70 | https://github.com/dime-wb-trainings/lyrics-clean. 71 | 72 | 2. If you want to modify how these slides are created, 73 | then you can find the python code used to set up this repos in the 74 | [jupyter-repo-setup](https://github.com/worldbank/dime-github-trainings/tree/main/GitHub-trainings/Intro-Git-GitHub-Contributor/jupyter-repo-setup) 75 | folder. 76 | You can modify that script to create a copy of the repo however you want. 77 | 78 | ## Contact 79 | 80 | If you have any questions about this training, please email us at dimeanalytics@worldbank.org 81 | -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/dime.scss: -------------------------------------------------------------------------------- 1 | /*-- scss:defaults --*/ 2 | 3 | // importing fonts Arimo and Lato 4 | @import url('https://fonts.googleapis.com/css2?family=Arimo:ital,wght@0,400;0,500;0,600;0,700;1,400;1,500;1,600;1,700&family=Lato:ital,wght@0,100;0,300;0,400;0,700;1,100;1,300;1,400;1,700&display=swap'); 5 | 6 | // fonts 7 | $font-family-sans-serif: 'Lato', sans-serif !default; 8 | 9 | // headings 10 | $presentation-heading-font: 'Lato', sans-serif !default; 11 | $presentation-heading-color: #07202E !default; 12 | $h1-font-size: 1.6em !default; 13 | $h2-font-size: 1.3em !default; 14 | $h3-font-size: 1.15em !default; 15 | 16 | //code 17 | $code-color: #4090BE !default; 18 | $font-family-monospace: 'Inconsolata', monospace !default; 19 | 20 | // general 21 | $body-bg: #FFFFFF; 22 | $Almost-White: #f8f8f8; 23 | $body-color: #000000; 24 | $link-color: #4090BE; 25 | $solid-blue: #07202E; 26 | $presentation-font-size-root: 28px; 27 | 28 | // math 29 | $math-fontsize: 80%; 30 | 31 | /*-- scss:rules --*/ 32 | .reveal pre code { 33 | background-color: #f8f8f8; 34 | font-size: 1em; 35 | padding: 0.5em; 36 | line-height: 1.2em; 37 | } 38 | 39 | .reveal .slide-number a { 40 | color: $link-color; 41 | } 42 | 43 | #title-slide { 44 | text-align: left; 45 | 46 | .title { 47 | font-size: 1.5em; 48 | border-bottom: 5px solid $link-color; 49 | } 50 | .title:after { 51 | content: ''; 52 | display: block; 53 | border-bottom: 5px solid $solid-blue; 54 | margin-bottom: -5px; 55 | max-width: 50%; 56 | } 57 | 58 | .subtitle { 59 | color: $solid-blue; 60 | font-size: 90%; 61 | font-family: $presentation-heading-font; 62 | } 63 | 64 | 65 | .institute, .quarto-title-affiliation { 66 | font-style: italic; 67 | font-size: 80%; 68 | } 69 | 70 | .author, .quarto-title-author-name { 71 | color: $solid-blue; 72 | font-size: 85%; 73 | } 74 | 75 | .date, .quarto-title-author-name { 76 | color: $solid-blue; 77 | font-size: 80%; 78 | } 79 | 80 | .quarto-title-authors { 81 | display: flex; 82 | justify-content: left; 83 | 84 | .quarto-title-author { 85 | padding-left: 0em; 86 | padding-right: 0em; 87 | width: 100%; 88 | } 89 | } 90 | 91 | p.author::before, div.quarto-title-author::before { 92 | content: ""; 93 | display: block; 94 | border: none; 95 | background-color: $body-bg; 96 | color: $solid-blue; 97 | height: 3px; 98 | margin-bottom: 1em; 99 | } 100 | 101 | p, a { 102 | color: $solid-blue; 103 | } 104 | } 105 | 106 | .author { 107 | color: $solid-blue; 108 | font-size: $h2-font-size; 109 | font-family: $presentation-heading-font; 110 | } 111 | 112 | .footer { 113 | font-family: $presentation-heading-font; 114 | } 115 | 116 | .reveal .slide-number { 117 | font-family: $presentation-heading-font; 118 | } 119 | 120 | .reveal .panel-tabset [role=tab] { 121 | font-size: 0.8em; 122 | } 123 | 124 | .reveal .footer { 125 | color: black; 126 | } 127 | 128 | .has-dark-background .footer { 129 | color: white; 130 | } 131 | 132 | .center-x{ 133 | text-align: center; 134 | } 135 | 136 | .center-xy { 137 | margin: 0; 138 | position: absolute; 139 | top: 50%; 140 | left: 50%; 141 | -ms-transform: translateY(-50%), translateX(-50%); 142 | transform: translateY(-50%), translateX(-50%); 143 | } 144 | 145 | section.has-dark-background a, section.has-dark-background a:hover { 146 | color: $Almost-White; 147 | } 148 | 149 | .slide-logo { 150 | display: block !important; 151 | position: fixed !important; 152 | top: 0 !important; 153 | right: 10px !important; 154 | max-height: 8% !important; 155 | height: 100% !important; 156 | width: auto !important; 157 | color: $body-color !important; 158 | } 159 | 160 | .slide-number, .reveal.has-logo .slide-number { 161 | bottom: 10px !important; 162 | right: 10px !important; 163 | top: unset !important; 164 | color: $body-color !important; 165 | } 166 | 167 | // Vertically Centering Elements 168 | .v-center-container { 169 | display: flex !important; 170 | justify-content: center; 171 | align-items: center; 172 | height: 90%; 173 | } 174 | 175 | // Vertically and Horizontal Centering Elements 176 | .vh-center-container { 177 | display: flex !important; 178 | justify-content: center; 179 | align-items: center; 180 | height: 90%; 181 | text-align: center; 182 | } 183 | 184 | .h-center-container { 185 | text-align: center; 186 | } 187 | 188 | // Math 189 | .MathJax { 190 | font-size: $math-fontsize !important; 191 | } 192 | 193 | -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/WBlogo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 57 | 58 | -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Templates/README.md: -------------------------------------------------------------------------------- 1 | # DIME Analytics GitHub Templates 2 | 3 | In this folder there are templates for files with Git/GitHub specific purpose. See the corresponding section below for instructions for each file. 4 | 5 | * [.gitignore template](#dime-analytics-gitignore-template) - a _.gitignore_ files controls which types of files will be shared in the GitHub repository 6 | * [placeholder template](#dime-analytics-placeholder-template) - a file that can be used to share an empty folder in the GitHub repository 7 | 8 | ## DIME Analytics _.gitignore_ template 9 | 10 | #### Purpose 11 | 12 | All repositories should always have a _.gitignore_ file that controls which file are uploaded to the repository. Examples of files that should not be uploaded to GitHub are: 13 | 14 | * _Binary file formats_ like .doc/.docx, .dta, .xls/.xlsx, .pdf etc. 15 | * The opposite to _binary file formats_ are _raw text file formats_. Examples are .do, .R, .txt, .tex, .csv etc. GitHub is intended to be used with raw text files 16 | * It is technically possible to upload _binary files_ to the repository, but they will slow down working with the repo if they are edited frequently. 17 | * Password files and tokens. The code we share on GitHub might need access to a password, for example to access an API, and they should be ignored, and instead being shared in the most secure way, and be copied to the clone manually. 18 | * There are system generated files - like `.DS_store` on Macs - that will make the repository messy if they are shared. 19 | 20 | #### Why use a _.gitignore_ template? 21 | 22 | Project teams usually have to customize their _.gitignore_ to fit the needs of their project, but they should always start from a template. The templates offered by GitHub tend to be specific to a programming language like Java, C++ or web-design. DIME Analytics have designed a template that is a great starting point for research teams coding in Stata, R, Python, Matlab etc. 23 | 24 | GitHub has a template for Python, but we still recommend using our template as it is designed for research teams that share data and have outputs. The Python template on GitHub is designed for use cases more common in computer science and software development. 25 | 26 | #### How to use this _.gitignore_ template 27 | 28 | This template is shared under the MIT LICENSE and is therefore free for anyone to use and to modify for their own purposes. If you are familiar with _.gitignore_ files, then you can set up your own file however you want, but below are instructions for one way how to do so correctly that we have found are easy to follow even for people with little GitHub Experience. 29 | 30 | 1. Go to the main page of your repository at GitHub.com. The main page is the page in your repository is the page that looks like this: https://github.com/worldbank/dime-github-trainings 31 | 1. In this top folder on the main page, click `Create new file` 32 | 1. In the _Name your file..._ field, type `.gitignore`. The `.` before `gitignore` must be included. 33 | 1. Once you have types `.gitignore`, a button will show up that says `Choose .gitignore: None`. Click that button and select any template. It does not matter which template you select as we will replace the content with the DIME Analytics template in the next step. We are only doing this to make sure the file is set up correctly. 34 | 1. Either commit the file now, or do the next step and then commit. If you commit now, you can pull the edits and do the next step in your clone, otherwise you must continue in the browser. 35 | 1. Replace the content in you _.gitignore_ file with the content in [DIME Analytics template](https://raw.githubusercontent.com/worldbank/dime-github-trainings/master/GitHub-resources/DIME-GitHub-Templates/gitignore_template.txt) and then commit this file to the repository. 36 | 37 | If necessary, you can now make additions to the _.gitignore_ file that are specific to your project. But you can also do that at any point in the future. 38 | 39 | ## DIME Analytics placeholder template 40 | 41 | #### Purpose 42 | 43 | In Git only files are shared. Folders are still implicitly shared in Git as files are shared with the folder location in the file name. However this means that only folders that have a file or a sub-folder with a file is shared. Therefore, empty folders or folders where all files are ignored in _.gitignore_ are not shared. 44 | 45 | It is common that repositories for research projects needs to share empty folders. For example, graph file formats are binary and should therefore not be shared in the repository, instead they should be generated by code. Let's say that the code saves the graphs in a folder called `outputs\graphs`. This folder exists in your clone but not in anyone else's clone since to Git it is empty and therefore not share as all content of this folder is ignored. This means that anyone else running your code will get an error where those graphs are created as the code expects the `outputs\graphs` folder, but no-one but you have that folder. 46 | 47 | Somehow we need a way to share these folder, and the way to do that is to add a placeholder file. 48 | 49 | #### Why use a _placeholder file_ template? 50 | This template is just a suggestion and is not as important that it is copied word by word as, for example, the _.gitignore_ template. In fact, it is even better if teams customize the content of their placeholder files to provide project specific information, but we have provided a template for convenience. 51 | 52 | #### How to use this _placeholder file_ template 53 | 54 | There are several ways this template can be copied to your repository. However it is copied, it is should always be renamed to `README.md`. That is a special name in GitHub, and it will be displayed in the browser when anyone navigates to the folder on GitHub.com where this file sits. 55 | 56 | If you are using Stata you can use the command [iegitaddmd](https://dimewiki.worldbank.org/wiki/Iegitaddmd) from the [ietoolkit package](https://github.com/worldbank/ietoolkit) to automate this task. 57 | 58 | Other ways to use this place holder file is to clone this repository and copy the files on your computer to the clone where you have empty folder that needs to be shared. Or you can follow the instructions for how to copy the _.gitignore_ file, but if you do copy the placholder template content from [here](https://raw.githubusercontent.com/worldbank/dime-github-trainings/master/GitHub-resources/DIME-GitHub-Templates/placeholder-README.md) to get the markdown formatting. 59 | -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Roles/DIME-GitHub-roles.md: -------------------------------------------------------------------------------- 1 | # DIME GitHub Roles 2 | ## About GitHub Roles 3 | * These roles are templates that are often adjusted to fit each project, but this template should always be a good starting point 4 | * Not all of these roles are official GitHub roles, and a role described here might be called something else in other GitHub guidelines, however the intuition behind them will be the same 5 | * Some team members will have multiple roles for the same repository. 6 | * On smaller projects some team member might have all the roles listed here 7 | 8 | ## DIME GitHub Team Structure 9 | These are assumptions we make about a typical research team. Most teams are not a typical team, but we still think that most team will be able to use this a great starting point. 10 | 11 | * Not all roles are needed in each repository, some roles can exist across teams 12 | * Team structures differ across organizations, so this sections explains is meant by team in this paper to avoid confusion 13 | teams 14 | * These guidelines are based on DIME’s team structure, but the roles in this document should be applicable even if your team is organized differently 15 | * To describe how this could work we are defining three types of teams: 16 | * Project Team - The team members that work on a single repository for a specific project 17 | * Research Team - A research team consists of multiple project teams that do research on similar topic, using similar methods etc. 18 | * Unit - A unit consists of several research teams 19 | * If a research team only has one project, then the terms research team and project team can be seen as completely synonymous 20 | 21 | ## Role Descriptions 22 | Click the links or scroll down for full description 23 | 24 | * Repository specific roles 25 | * [Observer](#observer) - many per repository 26 | * [Contributor](#contributor) - many per repository 27 | * [Repo Maintainer](#repo-maintainer) - typically one per repository 28 | * [Repo Admin](#repo-admin) - a few in each research team 29 | * General roles - Roles related to GitHub but not specific to a repository 30 | * [Team Maintainer](#team-maintainer) 31 | * [Unit Admin](#unit-admin) 32 | 33 | ---------- 34 | ## Repository Specific Roles 35 | ### Observer 36 | #### Does what: 37 | * Read code and follow progress of a project on GitHub 38 | * Participate in discussions in issues etc., but not submitting fixes to them (as then they are Contributors) 39 | 40 | #### How many exist or are needed: 41 | Since this is not an active role, there is no restriction to how many Observers exist on one repository, or how many repositories one person can be an Observer for. 42 | 43 | #### Typically who: 44 | The general public for public repositories, and team members in private repositories that are not Contributors (for example a non-coding PI) 45 | 46 | #### Need to know: 47 | Almost nothing specific to Git/GitHub. To understand progress an Observer should understand branches as the latest edits might not be in the Master branch. 48 | 49 | ---------- 50 | ### Contributor 51 | #### Does what: 52 | Submit edits to the code (or any other part of the content) in the repository 53 | 54 | #### How many exist or are needed: 55 | Typically, there are many Contributors to a repository, and most Contributors will be Contributors to several repositories. 56 | 57 | #### Typically who: 58 | * Most people in the project team tend to be Contributors 59 | * RAs are the most active Contributors 60 | * PIs that code are Contributors, but not all PIs are Contributors (some are Observers) 61 | * Code reviewer and other QA roles are examples of people that are not members of a the project team but could still be Contributors as they might also submit edits to the code 62 | 63 | #### Need to know: 64 | * Need to understand and be able to use Clone, Commit, and Branch 65 | * Need to understand directions from Repo Maintainer on where to commit and where to branch from. 66 | 67 | DIME Analytics Intro to GitHub training 68 | 69 | ---------- 70 | ### Repo Maintainer 71 | #### Does what: 72 | * Be in charge of reviewing and merging contributions to protected branches (for example the master and develop branch). Reviewing includes: 73 | * Making sure that the code does not break other contributions made to these branches. This requires the Repo Maintainer to have a very good overview of the content in the repository 74 | * Making sure that code is legible, reproducible and follows the research team’s coding standards 75 | * Be the point person for all Contributors when they have questions on the content in the repository, or the workflow for how contributions are made to the repository 76 | 77 | #### How many exist or are needed: 78 | * Typically one per repository. But with larger repositories there could be several, in which case it is important that responsibilities are clearly divided. 79 | * Being Repo Maintainer is often a lot of work, so it is typically not a good idea to be repository maintainer for many repositories, maybe not even more than one repository, unless some or all of them are fairly inactive. 80 | 81 | #### Typically who: 82 | * Not necessarily the most senior person on the project, as a PI or a single senior RA would not have time for this role on all repositories in a research team 83 | * Typically the RA in the project with the best knowledge of the code, or the most time dedicated to that project 84 | * This person should not be very new to GitHub unless they have good support from a Unit Admin 85 | 86 | #### Need to know: 87 | This is the repository specific role that requires the by far best understanding of GitHub. An inexperienced Repo Maintainer should have a Unit Admin person to consult. 88 | 89 | ---------- 90 | ### Repo Admin 91 | #### Does what: 92 | All non-content settings, such as editing access rights to the repository. 93 | 94 | #### How many exist or are needed: 95 | * A few per research team, usually good if a small group of people takes this role for several repositories across the research team 96 | * Repo admins do not need to be Contributors or Repo Maintainers for all the repositories they are Repo Admins for. Repo Maintainer can communicate to Repo Admins when needed 97 | 98 | #### Typically who: 99 | * Senior RAs experienced in GitHub 100 | * PI who knows GitHub well 101 | 102 | #### Need to know: 103 | Need to know GitHub settings. Basic knowledge is fine as long as the Repo Admin have access to a Unit Admin that can assist. 104 | 105 | ---------- 106 | ### Team Maintainer 107 | #### Does what: 108 | Adding and removing people from teams on GitHub 109 | 110 | #### How many exist or are needed: 111 | Two or three per research team. 112 | 113 | #### Typically who: 114 | * Senior RAs that has a good overview over who is currently in the team 115 | 116 | #### Need to know: 117 | No technical knowledge needed, as this is mostly an admin role. Unit Admin can show a new Team Maintainer how what this role needs to know in a few min 118 | 119 | ---------- 120 | ### Unit Admin 121 | #### Does what: 122 | Advise and support Repo Admins and Repo Maintainer. Unit Admins could be back up Repo Admins to the all the repositories in the unit. 123 | 124 | #### How many exist or are needed: 125 | This role does not have to exist in the team, it is enough for a research team to have access to a Unit Admin 126 | 127 | #### Typically who: 128 | This is not an official role, but it would be good for research teams to think who can be their Unit Admin 129 | 130 | #### Need to know: 131 | Needs to know GitHub really well. Unit Admins should be the most experienced Git/GitHub users in the whole unit. 132 | -------------------------------------------------------------------------------- /GitHub-trainings/git-github-ttl-intro/_extensions/dime/setup_ggplot2_dime.R: -------------------------------------------------------------------------------- 1 | # A theme for {ggplot2} graphs for the DIME unit of the World Bank. 2 | theme_dime <- function(base_family = "sans", 3 | base_size = 11.5, 4 | plot_title_family = base_family, 5 | plot_title_size = 18, 6 | plot_title_face = "bold", 7 | plot_title_margin = 10, 8 | subtitle_family = base_family, 9 | subtitle_size = 12, 10 | subtitle_face = "plain", 11 | subtitle_margin = 15, 12 | strip_text_family = base_family, 13 | strip_text_size = 12, 14 | strip_text_face = "plain", 15 | caption_family = base_family, 16 | caption_size = 9, 17 | caption_face = "italic", 18 | caption_margin = 10, 19 | axis_text_size = base_size, 20 | axis_title_family = subtitle_family, 21 | axis_title_size = 9, 22 | axis_title_face = "plain", 23 | axis_title_just = "rt", 24 | plot_margin = ggplot2::margin(30, 30, 30, 30), 25 | grid_col = "#cccccc", 26 | grid = TRUE, 27 | axis_col = "#cccccc", 28 | axis = FALSE, 29 | ticks = FALSE) { 30 | ret <- 31 | ggplot2::theme_minimal(base_family = base_family, base_size = base_size) 32 | 33 | ret <- 34 | ret + ggplot2::theme(legend.background = ggplot2::element_blank()) 35 | ret <- ret + ggplot2::theme(legend.key = ggplot2::element_blank()) 36 | 37 | if (inherits(grid, "character") | grid == TRUE) { 38 | ret <- 39 | ret + ggplot2::theme(panel.grid = ggplot2::element_line(color = grid_col, linewidth = 0.2)) 40 | ret <- 41 | ret + ggplot2::theme(panel.grid.major = ggplot2::element_line(color = grid_col, linewidth = 0.2)) 42 | ret <- 43 | ret + ggplot2::theme(panel.grid.minor = ggplot2::element_line(color = grid_col, linewidth = 0.15)) 44 | 45 | if (inherits(grid, "character")) { 46 | if (regexpr("X", grid)[1] < 0) 47 | ret <- 48 | ret + ggplot2::theme(panel.grid.major.x = ggplot2::element_blank()) 49 | if (regexpr("Y", grid)[1] < 0) 50 | ret <- 51 | ret + ggplot2::theme(panel.grid.major.y = ggplot2::element_blank()) 52 | if (regexpr("x", grid)[1] < 0) 53 | ret <- 54 | ret + ggplot2::theme(panel.grid.minor.x = ggplot2::element_blank()) 55 | if (regexpr("y", grid)[1] < 0) 56 | ret <- 57 | ret + ggplot2::theme(panel.grid.minor.y = ggplot2::element_blank()) 58 | } 59 | 60 | } else { 61 | ret <- ret + ggplot2::theme(panel.grid = ggplot2::element_blank()) 62 | } 63 | 64 | if (inherits(axis, "character") | axis == TRUE) { 65 | ret <- 66 | ret + ggplot2::theme(axis.line = ggplot2::element_line(color = "#2b2b2b", size = 0.15)) 67 | if (inherits(axis, "character")) { 68 | axis <- tolower(axis) 69 | if (regexpr("x", axis)[1] < 0) { 70 | ret <- ret + ggplot2::theme(axis.line.x + ggplot2::element_blank()) 71 | } else { 72 | ret <- 73 | ret + ggplot2::theme(axis.line.x + ggplot2::element_line(color = axis_col, linewidth = 0.15)) 74 | } 75 | if (regexpr("y", axis)[1] < 0) { 76 | ret <- ret + ggplot2::theme(axis.line.y + ggplot2::element_blank()) 77 | } else { 78 | ret <- 79 | ret + ggplot2::theme(axis.line.y = ggplot2::element_line(color = axis_col, linewidth = 0.15)) 80 | } 81 | } else { 82 | ret <- 83 | ret + ggplot2::theme(axis.line.x = ggplot2::element_line(color = axis_col, linewidth = 0.15)) 84 | ret <- 85 | ret + ggplot2::theme(axis.line.y = ggplot2::element_line(color = axis_col, linewidth = 0.15)) 86 | } 87 | } else { 88 | ret <- ret + ggplot2::theme(axis.line = ggplot2::element_blank()) 89 | } 90 | 91 | if (!ticks) { 92 | ret <- ret + ggplot2::theme(axis.ticks = ggplot2::element_blank()) 93 | ret <- 94 | ret + ggplot2::theme(axis.ticks.x = ggplot2::element_blank()) 95 | ret <- 96 | ret + ggplot2::theme(axis.ticks.y = ggplot2::element_blank()) 97 | } else { 98 | ret <- 99 | ret + ggplot2::theme(axis.ticks = ggplot2::element_line(size = 0.15)) 100 | ret <- 101 | ret + ggplot2::theme(axis.ticks.x = ggplot2::element_line(size = 0.15)) 102 | ret <- 103 | ret + ggplot2::theme(axis.ticks.y = ggplot2::element_line(size = 0.15)) 104 | ret <- 105 | ret + ggplot2::theme(axis.ticks.length = grid::unit(5, "pt")) 106 | } 107 | 108 | xj <- 109 | switch( 110 | tolower(substr(axis_title_just, 1, 1)), 111 | b = 0, 112 | l = 0, 113 | m = 0.5, 114 | c = 0.5, 115 | r = 1, 116 | t = 1 117 | ) 118 | yj <- 119 | switch( 120 | tolower(substr(axis_title_just, 2, 2)), 121 | b = 0, 122 | l = 0, 123 | m = 0.5, 124 | c = 0.5, 125 | r = 1, 126 | t = 1 127 | ) 128 | 129 | ret <- 130 | ret + ggplot2::theme(axis.text.x = ggplot2::element_text(size = axis_text_size, margin = 131 | +ggplot2::margin(t = 0))) 132 | ret <- 133 | ret + ggplot2::theme(axis.text.y = ggplot2::element_text(size = axis_text_size, margin = 134 | +ggplot2::margin(r = 0))) 135 | ret <- 136 | ret + ggplot2::theme(axis.title = ggplot2::element_text(size = axis_title_size, family = 137 | axis_title_family)) 138 | ret <- 139 | ret + ggplot2::theme( 140 | axis.title.x = ggplot2::element_text( 141 | hjust = xj, 142 | size = axis_title_size, 143 | family = axis_title_family, 144 | face = axis_title_face 145 | ) 146 | ) 147 | ret <- 148 | ret + ggplot2::theme( 149 | axis.title.y = ggplot2::element_text( 150 | hjust = yj, 151 | size = axis_title_size, 152 | family = axis_title_family, 153 | face = axis_title_face 154 | ) 155 | ) 156 | ret <- 157 | ret + ggplot2::theme( 158 | axis.title.y.right = ggplot2::element_text( 159 | hjust = yj, 160 | size = axis_title_size, 161 | angle = 90, 162 | family = axis_title_family, 163 | face = axis_title_face 164 | ) 165 | ) 166 | ret <- 167 | ret + ggplot2::theme( 168 | strip.text = ggplot2::element_text( 169 | hjust = 0, 170 | size = strip_text_size, 171 | face = strip_text_face, 172 | family = strip_text_family 173 | ) 174 | ) 175 | ret <- 176 | ret + ggplot2::theme(panel.spacing = grid::unit(2, "lines")) 177 | ret <- 178 | ret + ggplot2::theme( 179 | plot.title = ggplot2::element_text( 180 | hjust = 0, 181 | size = plot_title_size, 182 | margin = +ggplot2::margin(b = plot_title_margin), 183 | family = plot_title_family, 184 | face = plot_title_face 185 | ) 186 | ) 187 | ret <- 188 | ret + ggplot2::theme( 189 | plot.subtitle = ggplot2::element_text( 190 | hjust = 0, 191 | size = subtitle_size, 192 | margin = +ggplot2::margin(b = subtitle_margin), 193 | family = subtitle_family, 194 | face = subtitle_face 195 | ) 196 | ) 197 | ret <- 198 | ret + ggplot2::theme( 199 | plot.caption = ggplot2::element_text( 200 | hjust = 1, 201 | size = caption_size, 202 | margin = +ggplot2::margin(t = caption_margin), 203 | family = caption_family, 204 | face = caption_face 205 | ) 206 | ) 207 | ret <- ret + ggplot2::theme(plot.margin = plot_margin) 208 | 209 | ret 210 | 211 | } 212 | 213 | # Set to default {ggplot2} theme in Quarto script. 214 | 215 | ggplot2::theme_set(theme_dime(base_size = 18, base_family = "Alegreya Sans")) 216 | 217 | # Some extra configuration options 218 | 219 | if (nzchar(system.file(package = "ggtext"))) { 220 | ggplot2::theme_update( 221 | plot.title = ggtext::element_markdown(), 222 | plot.subtitle = ggtext::element_markdown(face = "italic"), 223 | plot.caption = ggtext::element_markdown(face = "italic"), 224 | axis.title.x = ggtext::element_markdown(), 225 | axis.text.x = ggtext::element_markdown(), 226 | axis.title.y = ggtext::element_markdown(), 227 | axis.text.y = ggtext::element_markdown() 228 | ) 229 | } 230 | ggplot2::update_geom_defaults("point", list(colour = ggplot2::theme_get()$line$colour)) 231 | 232 | options( 233 | ggplot2.discrete.colour = function(...) 234 | ggplot2::scale_colour_viridis_d(..., begin = 0.15, end = 0.85), 235 | ggplot2.discrete.fill = function(...) 236 | ggplot2::scale_fill_viridis_d(..., begin = 0.15, end = 0.85), 237 | ggplot2.continuous.colour = function(...) 238 | ggplot2::scale_colour_viridis_c(..., begin = 0.15, end = 0.85), 239 | ggplot2.continuous.fill = function(...) 240 | ggplot2::scale_fill_viridis_c(..., begin = 0.15, end = 0.85) 241 | ) 242 | -------------------------------------------------------------------------------- /GitHub-trainings/Intro-Git-GitHub-Contributor/jupyter-repo-setup/Setup TrainingRepo.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": {}, 6 | "source": [ 7 | "# Script that sets up training repository\n", 8 | "\n", 9 | "Change the settings in the first cell and run all to create the repository and send the invitations." 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": {}, 16 | "outputs": [], 17 | "source": [ 18 | "import os, sys, json,importlib, base64,urllib, time\n", 19 | "\n", 20 | "#This notebook requires you to install https://github.com/PyGithub/PyGithub first\n", 21 | "from github import Github, Auth\n", 22 | "\n", 23 | "#Add parent folder to library paths\n", 24 | "module_path = os.path.abspath(os.path.join('../../Common-Resources'))\n", 25 | "if module_path not in sys.path:\n", 26 | " sys.path.append(module_path)\n", 27 | "import github_tools as ghTools" 28 | ] 29 | }, 30 | { 31 | "cell_type": "code", 32 | "execution_count": null, 33 | "metadata": { 34 | "scrolled": true 35 | }, 36 | "outputs": [], 37 | "source": [ 38 | "accessToken = ghTools.getTokenAttribute(attribute=\"token\")\n", 39 | "auth = Auth.Token(accessToken)\n", 40 | "ghSession = Github(auth=auth)\n", 41 | "\n", 42 | "#get user\n", 43 | "user = ghSession.get_user()\n", 44 | "user.login" 45 | ] 46 | }, 47 | { 48 | "cell_type": "markdown", 49 | "metadata": { 50 | "scrolled": true 51 | }, 52 | "source": [ 53 | "### Manually input name of repository" 54 | ] 55 | }, 56 | { 57 | "cell_type": "code", 58 | "execution_count": null, 59 | "metadata": {}, 60 | "outputs": [], 61 | "source": [ 62 | "#The name of the repository to create, use random 4 letters to get unique url\n", 63 | "reponame = \"lyrics\"\n", 64 | "\n", 65 | "#Variables if repo should be created on org account\n", 66 | "dime_training_account = \"dime-wb-trainings\"\n", 67 | "use_org_account = True" 68 | ] 69 | }, 70 | { 71 | "cell_type": "markdown", 72 | "metadata": {}, 73 | "source": [ 74 | "Switch host to org account" 75 | ] 76 | }, 77 | { 78 | "cell_type": "code", 79 | "execution_count": null, 80 | "metadata": {}, 81 | "outputs": [], 82 | "source": [ 83 | "# Set the account where the training repo will be created\n", 84 | "if use_org_account:\n", 85 | " account = ghSession.get_organization(dime_training_account)\n", 86 | "else:\n", 87 | " account = user" 88 | ] 89 | }, 90 | { 91 | "cell_type": "markdown", 92 | "metadata": {}, 93 | "source": [ 94 | "## Creating the repo" 95 | ] 96 | }, 97 | { 98 | "cell_type": "code", 99 | "execution_count": null, 100 | "metadata": {}, 101 | "outputs": [], 102 | "source": [ 103 | "#making sure the repo is not already tere\n", 104 | "try:\n", 105 | " del_repo = ghSession.get_repo(account.login+\"/\"+reponame)\n", 106 | " print(\"Deleted: \" + del_repo.full_name)\n", 107 | " del_repo.delete()\n", 108 | "except:\n", 109 | " print(\"No repo with that name\")" 110 | ] 111 | }, 112 | { 113 | "cell_type": "code", 114 | "execution_count": null, 115 | "metadata": {}, 116 | "outputs": [], 117 | "source": [ 118 | "#Create the repo\n", 119 | "training_repo = account.create_repo(reponame, auto_init=True)\n", 120 | "print(training_repo)\n", 121 | "print(training_repo.html_url)\n", 122 | "\n", 123 | "time.sleep(2)" 124 | ] 125 | }, 126 | { 127 | "cell_type": "markdown", 128 | "metadata": {}, 129 | "source": [ 130 | "### Replace the auto initialized repo with the prepared README and add .gitignore" 131 | ] 132 | }, 133 | { 134 | "cell_type": "markdown", 135 | "metadata": {}, 136 | "source": [ 137 | "#### update README" 138 | ] 139 | }, 140 | { 141 | "cell_type": "code", 142 | "execution_count": null, 143 | "metadata": { 144 | "scrolled": true 145 | }, 146 | "outputs": [], 147 | "source": [ 148 | "#Get the commit sha from where the README was created in the auto_init\n", 149 | "contents = training_repo.get_contents(\"README.md\")\n", 150 | "\n", 151 | "#Read the README file in this repo to get the content for the commit\n", 152 | "file_content = open('repo-content-files/README.md', 'rb').read()\n", 153 | "#print(file_content)\n", 154 | "\n", 155 | "#Update the README file\n", 156 | "readme_update_result = training_repo.update_file(\"README.md\", \n", 157 | " \"Update README.md\", \n", 158 | " file_content,\n", 159 | " contents.sha,\n", 160 | " branch=\"main\")\n", 161 | "\n", 162 | "readme_update_sha = readme_update_result[\"commit\"].sha\n", 163 | "print(readme_update_result)" 164 | ] 165 | }, 166 | { 167 | "cell_type": "markdown", 168 | "metadata": {}, 169 | "source": [ 170 | "#### Create the initial-branch" 171 | ] 172 | }, 173 | { 174 | "cell_type": "code", 175 | "execution_count": null, 176 | "metadata": {}, 177 | "outputs": [], 178 | "source": [ 179 | "training_repo.create_git_ref(\"refs/heads/initial-branch\", readme_update_sha)" 180 | ] 181 | }, 182 | { 183 | "cell_type": "markdown", 184 | "metadata": {}, 185 | "source": [ 186 | "#### add .gitignore" 187 | ] 188 | }, 189 | { 190 | "cell_type": "code", 191 | "execution_count": null, 192 | "metadata": {}, 193 | "outputs": [], 194 | "source": [ 195 | "#Read the README file in this repo to get the content for the commit\n", 196 | "file_content = open(\"repo-content-files/no.gitignore\", 'rb').read()\n", 197 | "\n", 198 | "#Update the README file\n", 199 | "create_ignore_result = training_repo.create_file(\".gitignore\", \"add a ignore file\", file_content, branch=\"main\")" 200 | ] 201 | }, 202 | { 203 | "cell_type": "markdown", 204 | "metadata": {}, 205 | "source": [ 206 | "### Start adding lyrics files" 207 | ] 208 | }, 209 | { 210 | "cell_type": "code", 211 | "execution_count": null, 212 | "metadata": {}, 213 | "outputs": [], 214 | "source": [ 215 | "list_of_files = [\n", 216 | " [\"lyrics/pop/backstreets-back.txt\",\"Adding Backstreet Back - Go BSB!\"],\n", 217 | " [\"lyrics/rock/stairway-to-heaven.txt\",\"Stairway to Heaven! So GOOOD.\"],\n", 218 | " [\"lyrics/rock/november-rain.txt\",\"November Rain - The solo is AMAZING!\"],\n", 219 | " [\"lyrics/pop/mamma-mia.txt\",\"ABBA is the best! And this song is their best!\"]\n", 220 | "]\n", 221 | "\n", 222 | "for song_list in list_of_files:\n", 223 | " #Read the README file in this repo to get the content for the commit\n", 224 | " file_content = open(\"repo-content-files/\" + song_list[0], 'rb').read()\n", 225 | " #print(file_content)\n", 226 | "\n", 227 | " #Update the README file\n", 228 | " create_result = training_repo.create_file(song_list[0], song_list[1], file_content, branch=\"main\")\n", 229 | " \n", 230 | "last_sha = create_result[\"commit\"].sha\n", 231 | "print(last_sha)" 232 | ] 233 | }, 234 | { 235 | "cell_type": "code", 236 | "execution_count": null, 237 | "metadata": {}, 238 | "outputs": [], 239 | "source": [ 240 | "#Create the queen branch\n", 241 | "training_repo.create_git_ref(\"refs/heads/queen-branch\", last_sha)" 242 | ] 243 | }, 244 | { 245 | "cell_type": "code", 246 | "execution_count": null, 247 | "metadata": {}, 248 | "outputs": [], 249 | "source": [ 250 | "#Remove Abba from the queen branch\n", 251 | "contents = training_repo.get_contents(\"lyrics/pop/mamma-mia.txt\", ref=\"refs/heads/queen-branch\")\n", 252 | "training_repo.delete_file(contents.path, \"ABBA is not that great\", contents.sha, branch=\"queen-branch\")" 253 | ] 254 | }, 255 | { 256 | "cell_type": "code", 257 | "execution_count": null, 258 | "metadata": {}, 259 | "outputs": [], 260 | "source": [ 261 | "list_of_files = [\n", 262 | " [\"lyrics/pop/dont-stop-me-now.txt\",\"Dont try to stop me!, Yass Queen\",\"queen-branch\"]\n", 263 | "]\n", 264 | "\n", 265 | "for song_list in list_of_files:\n", 266 | " #Read the README file in this repo to get the content for the commit\n", 267 | " file_content = open(\"repo-content-files/\" + song_list[0], 'rb').read()\n", 268 | " #print(file_content)\n", 269 | "\n", 270 | " #Update the README file\n", 271 | " create_result = training_repo.create_file(song_list[0], song_list[1], file_content, branch=song_list[2])\n", 272 | " \n", 273 | " last_sha = create_result[\"commit\"].sha\n", 274 | " print(create_result)" 275 | ] 276 | } 277 | ], 278 | "metadata": { 279 | "kernelspec": { 280 | "display_name": "Python 3 (ipykernel)", 281 | "language": "python", 282 | "name": "python3" 283 | }, 284 | "language_info": { 285 | "codemirror_mode": { 286 | "name": "ipython", 287 | "version": 3 288 | }, 289 | "file_extension": ".py", 290 | "mimetype": "text/x-python", 291 | "name": "python", 292 | "nbconvert_exporter": "python", 293 | "pygments_lexer": "ipython3", 294 | "version": "3.11.13" 295 | } 296 | }, 297 | "nbformat": 4, 298 | "nbformat_minor": 4 299 | } 300 | -------------------------------------------------------------------------------- /GitHub-resources/DIME-GitHub-Guides/clone-location.md: -------------------------------------------------------------------------------- 1 | # Clone location best practices 2 | 3 | This guide discusses best practices for where on your computer 4 | you should clone repositories you are working on. 5 | It is common that users who do not follow these best practices 6 | do not encounter any problems for a long time - sometime even years. 7 | However, the day an error happens do to a bad location of the clone, 8 | then that error tends to be difficult to solve 9 | and/or risking that weeks of work are lost. 10 | So, it is best to follow these best practices in the first place. 11 | 12 | **Table of content:** 13 | 14 | * [What are good locations for a clone?](#what-are-good-locations-for-a-clone) 15 | * [How do I move a clone on my computer?](#how-do-i-move-a-clone-on-my-computer) 16 | * [Why are synced folders a bad location for my clone?](#why-are-synced-folders-a-bad-location-for-my-clone) 17 | 18 | ## What are good locations for a clone? 19 | 20 | Most places on your computer are acceptable places for your clone, 21 | however, the places where you should not clone your repository 22 | tend to be the first places most users would think of. 23 | 24 | In short, the clone should not be stored in a folder that is 25 | managed by another software or managed by a remote team 26 | such as the IT department of your organization. 27 | The most common example of a folder managed by another software are folders 28 | synced in syncing software like OneDrive, Dropbox etc. 29 | A non-shared synced folder is still not a good place for a clone. 30 | Read more [below](#why-are-synced-folders-a-bad-location-for-my-clone) 31 | on why synced folders are not good locations for clones. 32 | 33 | In order to not have to remember what locations are good locations 34 | each time you clone a repository, it is a good practice to create a folder 35 | called `git`, `github`, `github-clones` or something similar 36 | where _all_ clones for _all_ projects you work on are stored. 37 | This way you only have to find a good location for your clones once, 38 | create this folder there and then clone all your clones in that folder. 39 | 40 | A common location for your clone is `C:\Users\username\github` on Windows computers 41 | (more specifically `C:\Users\wb123456\github` on WB computers 42 | where `123456` is replaced with your UPI) 43 | or `/Users/username/github` on Mac computers. 44 | Another common location is `C:\Users\username\Documents\github` 45 | or `/Users/username/Documents/github`, however, 46 | this location is acceptable only if OneDrive is not installed on your computer 47 | as then the `\Documents\` folder is also synced. 48 | OneDrive is commonly installed on Windows 10 computers, 49 | and is always installed on all WB computers. 50 | 51 | The best way to know if your folder is synced in OneDrive 52 | is to check if the folder has the _Status_ column 53 | when viewed in the file explorer. 54 | Any folder with this column (see image below) is indeed synced in OneDrive 55 | and **should not** be used to store clones. 56 | 57 | 58 | 59 | Another example of a type of folder where the clone should not be stored 60 | is a folder that is managed remotely by someone else, such as an IT department. 61 | It is common that you have one or several folders like this if 62 | your computer belongs to a large organization you are working for. 63 | Your access to this folder can change with little notice 64 | and you might therefore lose access to your clone. 65 | An almost universal convention across IT departments in most organizations 66 | is that your user folder in the path `C:\Users\` (Windows) or `/Users/` (Mac) 67 | is a folder you will always have access to. 68 | That is another reasons why `C:\Users\username\github` 69 | or `/Users/username/github` are excellent locations for all your clone. 70 | 71 | ## How do I move a clone on my computer? 72 | 73 | There are two methods we recommend to move a clone on your computer. 74 | Method 1 is easiest but can only be done in some special circumstances. 75 | Method 2 can always be used. 76 | 77 | #### Method 1: Re-clone 78 | 79 | ##### M1: Important - read first 80 | 81 | **Important**: When using this method you will lose anything not committed to GitHub.com. 82 | If you are unsure if that is acceptable in your case, use method 2. 83 | Content that **will be lost** when using this method includes: 84 | * Edits not yet first committed and then also pushed to GitHub.com 85 | * Any files ignored in your `.gitignore` file 86 | * Empty folders or folders with only ignored files 87 | 88 | Example of cases this method is appropriate to move clones on your computer includes: 89 | 90 | * Immediately after the clone was first cloned before any work has been done 91 | * A clone of a repository you never make any edits to, 92 | such as an open source tool you use in your code without editing it first 93 | 94 | 95 | ##### M1: How to move the clone 96 | 97 | In this method you simply delete the clone and clone the repository again. 98 | When deleting the clone it is important that you delete the full folder. 99 | This means that if your repository is called `lyrics-clone` 100 | then you should delete the folder called `lyrics-clone` and all its content. 101 | 102 | If you open GitHub Desktop and select this repository as your current repository, 103 | then you will see the screen shown in the image below. 104 | Then simply click the button "_Clone Again_". 105 | If you do not see this screen or 106 | if you are not able to select the repository as current repository, 107 | then just go to GitHub.com and clone it again. 108 | 109 | 110 | 111 | This method can also be used if you have some issues with a clone 112 | you know that you have no un-committed/pushed and no ignored files and 113 | and want to start over fresh. 114 | And in this case you can of course clone to the same location. 115 | 116 | #### Method 2: Move the existing clone 117 | 118 | If you want to move the clone and keep all content, 119 | including content not pushed to GitHub.com 120 | such as un-committed edits and ignored files, 121 | then you need to use this method. 122 | 123 | ###### M2: How to move the clone 124 | 125 | First start by copying the clone folder to the new location. 126 | Remember that you need to copy the folder and not just its content. 127 | If you have a repository called `lyrics-clone`, 128 | then you need to copy the clone folder with that name as well as all its content. 129 | 130 | Once you have completed the move of the clone folder, then open GitHub Desktop. 131 | Make sure that you have the repository of the clone you are moving 132 | selected as current repository. 133 | Then you should see the view in the first image below. 134 | Simply click the "_Locate_" and go to the new location of the clone. 135 | Remember to select the clone folder in this step, 136 | and not just the content of the clone. 137 | In the example we have used, 138 | this means that you should select the folder called `lyrics-clone`. 139 | See the second image below. 140 | 141 | 142 | 143 | 144 | 145 | If you do not see the screen where you are asked to locate the clone, 146 | then go to the menu of GitHub Desktop and select "_File_" -> "_Add local repository_". 147 | Then use the menu that comes up and select the clone folder in the new location. 148 | GitHub desktop will then identify this is the new location of the same clone, 149 | and it will detect that this is a clone of a repository hosted on GitHub.com. 150 | 151 | ## Why are synced folders a bad location for my clone? 152 | 153 | In short, syncing software and git are both collaboration tools, 154 | but they work very differently. 155 | And neither of the tools are implemented to work together, 156 | which can cause many different types of weird errors. 157 | 158 | #### Shared synced folders 159 | 160 | Putting a clone in a shared synced folder quickly leads to issues if 161 | more than one person is expected to work on the same clone in that shared folder. 162 | For example, if one user changes branch in the middle of someone else running the code, 163 | then all weird errors will happen as the files are changed by git. 164 | It is probably easy to see how this leads to errors 165 | and there is no standard workflow where this should ever be the norm. 166 | 167 | #### Non-shared synced folders 168 | 169 | What about non-shared synced folders? Then there will never be an issue with another user. 170 | While that is true, there are still errors than can happen in any kind of synced folder. 171 | And while these errors are more rare they are 172 | likely to cause major disruptions when they happen. 173 | 174 | When syncing software detects a file with edits to be synced to the cloud, 175 | it blocks access to that file for a fraction of a second. 176 | That is fine when it is only much slower humans that also competes for access to those files. 177 | However, git is not a human and in certain git actions, 178 | git can make many updates in a fraction of a second 179 | to the technical files in the `.git` folder. 180 | There is always a `.git` folder in all clone folders, 181 | but depending on the settings of your computer, 182 | this `.git` folder might or might not be visible to you. 183 | 184 | As you use different features of GitHub Desktop, 185 | series of git commands are executed in the background in rapid succession. 186 | This means that git might do an edit to a file, 187 | then do something else and then need to make a second edit to that first file. 188 | This can happen within the same fraction of a second under which 189 | a syncing software has blocked of access to the file. 190 | Sometimes this is fine, other times GitHub Desktop tells you there is an error, 191 | but sometimes there is an error in these files that is not detected immediately. 192 | 193 | This can lead to things like git not being aware that you have changed branch 194 | and commits you think you are committing to one branch, 195 | are actually pushed to a different branch. 196 | This is difficult enough to solved if identified early on, 197 | but it has happened in DIME projects that nothing was detected 198 | until it was pushed to GitHub.com and someone else tried to pull the same edits. 199 | 200 | Those errors can be as weird as according to GitHub Desktop, 201 | you are committing to one branch, 202 | thought what is really happening in the `.git` folder is that 203 | you are actually committing to some other branch. 204 | This will create weird conflicts that are difficult to solve. 205 | Sometimes the easiest way of solving such issue is to delete those commits 206 | and re-do all the work since the error happened. 207 | Since the error might have been undetected for a while, 208 | this could mean weeks or months of lost work. 209 | 210 | Again, these errors are rare but they have happened a couple of time at DIME, 211 | but since the best practice is so easy to follow, 212 | we should all remember to not put our clones in synced folders. 213 | -------------------------------------------------------------------------------- /GitHub-trainings/github-team-maintainer-training/latex-slides/github-team-maintainer-training.tex: -------------------------------------------------------------------------------- 1 | % ---------------------------- Preamble starts here ---------------------------- 2 | 3 | \documentclass[aspectratio=169]{beamer} %Remove [aspectratio=169] to get non-wide 4:3 slide aspect ratio 4 | 5 | %----------------------------------------------- 6 | % --- Set beamer theme 7 | \usetheme{Metropolis} 8 | \setbeamertemplate{footline}{} % Remove automatic footer 9 | \setbeamertemplate{navigation symbols}{} % Comment this line to display navigation symbols 10 | 11 | %----------------------------------------------- 12 | % Load i2i symbol 13 | \addtobeamertemplate{frametitle}{}{% 14 | \begin{textblock*}{\linewidth}(0cm,7.1cm) % Replace with (0cm, 8cm) if using non-wide slide aspect 15 | \includegraphics[width=\linewidth]{../../Common-Resources/img/Footer.png} 16 | \end{textblock*}} 17 | 18 | %----------------------------------------------- 19 | % --- Load packages 20 | \usepackage{textpos} % To align objects correctly 21 | \usepackage{multicol} % To right in multiple columns 22 | \usepackage{color} % To color text 23 | 24 | %----------------------------------------------- 25 | % --- Include link to last commit 26 | \usepackage{xstring} 27 | \usepackage{catchfile} 28 | 29 | %Set this user input 30 | \newcommand{\gitfolder}{../../../.git} %relative path to .git folder from .tex doc 31 | \newcommand{\reponame}{worldbank/dime-github-trainings} % Name of account and repo be set in URL 32 | 33 | %Based on this https://tex.stackexchange.com/questions/455396/how-to-include-the-current-git-commit-id-and-branch-in-my-document 34 | \CatchFileDef{\headfull}{\gitfolder/HEAD.}{} %Get path to head file for checked out branch 35 | \StrGobbleRight{\headfull}{1}[\head] %Remove end of line character 36 | \StrBehind[2]{\head}{/}[\branch] %Parse out the path only 37 | \CatchFileDef{\commit}{\gitfolder/refs/heads/\branch.}{} %Get the content of the branch head 38 | \StrGobbleRight{\commit}{1}[\commithash] %Remove end of line characted 39 | 40 | %Build the URL to this commit based on the information we now have 41 | \newcommand{\commiturl}{\url{https://github.com/\reponame/commit/\commithash}} 42 | 43 | %----------------------------------------------- 44 | % --- Add your information here 45 | \title{An intro to Git and GitHub - Team Maintainer} 46 | \author{DIME Analytics} 47 | \institute{DIME - The World Bank - \trainingURL{https://www.worldbank.org/en/research/dime}} 48 | \date{\today} 49 | 50 | \newcommand{\trainingURL}[1]{{\color{blue}\url{#1}}} 51 | 52 | \newcommand{\traininerUsername}{kbjarkefur} 53 | \newcommand{\repoName}{\traininerUsername/lyrics-Jun17} 54 | \newcommand{\trainingRepoURL}[1]{\trainingURL{github.com/\repoName #1}} 55 | \newcommand{\trainerEmail}{\trainingURL{kbjarkefur@worldbank.org} } 56 | 57 | 58 | % ---------------------------- Preamble ends here ---------------------------- 59 | 60 | \begin{document} 61 | 62 | \begin{frame} 63 | \includegraphics[width=\textwidth]{../../Common-Resources/img/Header.png} 64 | \vspace{-0.2cm} 65 | \titlepage % Opening slide, prints inform 66 | \end{frame} 67 | 68 | \begin{frame} 69 | \frametitle{Objectives} 70 | 71 | This is the topics that we will cover in this training: 72 | \begin{itemize} 73 | \item Why do we bother with teams? 74 | \item Quick guide to how to do team maintainer tasks 75 | \item What other tasks do we ask the team maintainers to help us with? 76 | \end{itemize} 77 | \end{frame} 78 | 79 | 80 | \begin{frame} 81 | \frametitle{Quick role overview} 82 | 83 | \begin{columns}[T] 84 | 85 | \column{.15\textwidth} % Left buffer 86 | 87 | \column{.30\textwidth} % Left column and width 88 | \textbf{Repo roles:} 89 | \begin{itemize} 90 | \item Contributor 91 | \item Repo Maintainer 92 | \item Repo Admin 93 | \end{itemize} 94 | 95 | \column{.10\textwidth} % Middle buffer 96 | 97 | \column{.30\textwidth} % Right column and width 98 | \textbf{Team roles:} 99 | \begin{itemize} 100 | \item Member 101 | \item Team Maintainer 102 | \end{itemize} 103 | 104 | \column{.15\textwidth} % Right buffer 105 | 106 | \end{columns} 107 | \end{frame} 108 | 109 | 110 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 111 | %% Why bither with teams? 112 | 113 | \section{Overview and work flow} 114 | 115 | \begin{frame} 116 | \frametitle{Objectives} 117 | 118 | \begin{itemize} 119 | \item As default we do not give the project teams admin access to the repos 120 | 121 | \item With admin access you can do potentially destructive actions -- such as deleting the whole repo and all its history. 122 | 123 | \item We still want you to give access to the teams to add and remove users from the repo without having to ask DIME Analytics each time. 124 | 125 | \item On GitHub, Teams can be used to control access to repos without giving admin access 126 | 127 | \end{itemize} 128 | \end{frame} 129 | 130 | \begin{frame} 131 | \frametitle{GitHub Teams Creation Work Flow} 132 | 133 | \begin{columns}[c] 134 | 135 | \column{.60\textwidth} % Left column and width 136 | \begin{enumerate} 137 | \item DIME Analytics creates a team 138 | \item DIME Analytics makes one team member the \textit{team maintainer} 139 | \item DIME Analytics creates a repo and adds the team to the repository 140 | \item The team maintainer add and remove user to the team to grant and revoke access to the repo 141 | \item Only users added to the DIME organization account can be added to teams 142 | \end{enumerate} 143 | 144 | \column{.40\textwidth} % Right column and width 145 | \begin{figure} 146 | \centering 147 | \includegraphics[width=1\linewidth]{./img/teams-workflow} 148 | \end{figure} 149 | 150 | \end{columns} 151 | \end{frame} 152 | 153 | 154 | \begin{frame} 155 | \frametitle{Quick talking points} 156 | 157 | \begin{columns}[c] 158 | 159 | \column{.50\textwidth} % Left column and width 160 | Quick facts about teams: 161 | \begin{itemize} 162 | \item There can be more than one team maintainer for a team 163 | \item A team can be used for more than one repo 164 | \item A repo can have more than one team added to it 165 | \end{itemize} 166 | 167 | \column{.50\textwidth} % Right column and width 168 | Admin access vs. Teams 169 | \begin{itemize} 170 | \item Can I be made admin instead of dealing with teams? 171 | \item Sure, but we will ask for the TTL's approval to do so after explaining to them the risks associated with admin access 172 | \end{itemize} 173 | 174 | \end{columns} 175 | \end{frame} 176 | 177 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 178 | %% Quick overview how to do things 179 | 180 | \section{How to do Team actions on GitHub.com} 181 | 182 | \begin{frame} 183 | \frametitle{Which teams am I in?} 184 | \textbf{How do I know which teams I am in?} 185 | \begin{enumerate} 186 | \item Go to \url{https://github.com/dime-worldbank} and click \textit{Teams} 187 | \item Then search for your username, like \textit{@username} 188 | \end{enumerate} 189 | \centering 190 | \includegraphics[width=.8\linewidth]{./img/which-teams-am-i-in} 191 | \end{frame} 192 | 193 | 194 | \begin{frame} 195 | \frametitle{Am I a team maintainer for a team?} 196 | \begin{columns}[c] 197 | 198 | \column{.30\textwidth} % Left column and width 199 | \textbf{Check who is team maintainer:} 200 | \begin{enumerate} 201 | \item Click the team name 202 | \item Click \textit{Members} 203 | \item See who has the \textit{Maintainer} sticker 204 | \end{enumerate} 205 | 206 | \column{.70\textwidth} % Right column and width 207 | \begin{figure} 208 | \centering 209 | \includegraphics[width=1\linewidth]{./img/who-is-team-maintainer} 210 | \end{figure} 211 | \end{columns} 212 | \end{frame} 213 | 214 | 215 | \begin{frame} 216 | \frametitle{How do I manage team members?} 217 | \begin{columns}[c] 218 | 219 | \column{.30\textwidth} % Left column and width 220 | \textbf{Add user:} 221 | \begin{enumerate} 222 | \item Click \textit{Add a member} 223 | \item Enter new members username 224 | \end{enumerate} 225 | 226 | \textbf{Remove user:} 227 | \begin{enumerate} 228 | \item Check the check box next to user 229 | \item Select \textit{Remove from team} in the menu that appears above the list of memebers 230 | \end{enumerate} 231 | 232 | 233 | \column{.70\textwidth} % Right column and width 234 | \begin{figure} 235 | \centering 236 | \includegraphics[width=1\linewidth]{./img/who-is-team-maintainer} 237 | \end{figure} 238 | \end{columns} 239 | \end{frame} 240 | 241 | 242 | \begin{frame} 243 | \frametitle{Which repos is a team used for?} 244 | \textbf{Which repos are a team used for?} 245 | \begin{enumerate} 246 | \item In the team page, click \textit{Repositories} 247 | \end{enumerate} 248 | \centering 249 | \includegraphics[width=.8\linewidth]{./img/which-repos-in-team} 250 | \end{frame} 251 | 252 | 253 | \begin{frame} 254 | \frametitle{Which teams are used for a repo?} 255 | \begin{columns}[c] 256 | \column{.30\textwidth} % Left column and width 257 | \textbf{Which teams in used in a repo?} 258 | \begin{enumerate} 259 | \item Go to \url{https://github.com/worldbank/dime-github-admin} 260 | \item Click reports, then click your repo 261 | \item Scroll down to collaborators and check the columns 262 | \end{enumerate} 263 | 264 | \column{.70\textwidth} % Right column and width 265 | \begin{figure} 266 | \centering 267 | \includegraphics[width=1\linewidth]{./img/which-teams-in-repo} 268 | \end{figure} 269 | \end{columns} 270 | \end{frame} 271 | 272 | 273 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 274 | %% Other tasks 275 | 276 | \section{Other tasks involving team maintainers} 277 | 278 | \begin{frame} 279 | \frametitle{Other tasks involving team maintainers} 280 | 281 | \begin{itemize} 282 | \item We will use the team maintainer as the contact person for repos linked to a team 283 | 284 | \item If admins have a question about a repo, then we will contact the team maintainer/maintainers for the team/teams linked to that repo. The team maintainer does not need to know all answers, but should at least know who to talk to 285 | 286 | \item Whenever admins are performing a large scale process, such as a transfer, we will turn to team maintainers for help 287 | 288 | \end{itemize} 289 | \end{frame} 290 | 291 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 292 | %% Transfer 293 | 294 | \section{Transfer to dime-worldbank account} 295 | 296 | \begin{frame} 297 | \frametitle{dime-worldbank account set up} 298 | 299 | \begin{itemize} 300 | \item In the new account we have an unlimited number of private and public repositories, but instead we pay for users. 301 | \item We pay for all users added to the the organization account. 302 | \item We pay for external collaborators added private repositories, but not for public repositories. 303 | \item DIME Analytics covers this cost for the foreseeable future, in return we just ask the team maintainers to help us remove people as they leave. 304 | \end{itemize} 305 | \end{frame} 306 | 307 | 308 | \begin{frame} 309 | \frametitle{Team maintainers tasks on transfer} 310 | 311 | \begin{enumerate} 312 | \item Check that all team members are still current members 313 | \item Check that all external collaborators for all repos the team is used for are still current users 314 | \item Decide if public repos should be transferred or not 315 | \item Help us communicate to the team. We provide a template for that communication, but it is better if it comes from you 316 | \end{enumerate} 317 | 318 | If you are interested, see our full transfer protocol here: \url{https://github.com/dime-worldbank/dime-account-admin-private/blob/master/transfer-from-old-account/README.md} 319 | \end{frame} 320 | 321 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 322 | %% Discussion 323 | 324 | \section{Discussion} 325 | 326 | \begin{frame} 327 | \frametitle{Discuss best practices} 328 | 329 | \begin{itemize} 330 | \item Big teams for many repos or one small team per repo? 331 | \item A team maintainer should know of the repos a team is used for but does not need to work on the projects for those repos 332 | \item Multiple team maintainer in one team? 333 | \item Give admin access to the research team? 334 | \item Other questions to discuss? 335 | \end{itemize} 336 | 337 | \end{frame} 338 | 339 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 340 | %% End boiler plate 341 | 342 | \section{Links} 343 | 344 | \input{../../Common-Resources/slides/GitHub-Links.tex} 345 | 346 | \input{../../Common-Resources/slides/GitHub-Commit-URL.tex} 347 | 348 | 349 | \end{document} 350 | --------------------------------------------------------------------------------