2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
# File 'lib/helptext.rb', line 2
def helpme
puts ""
puts "\tTBGit is a command-line utility to facilitate the management of multiple GitHub student repositories."
puts "\t\t\t~ created by the teaching staff at 2014 YEI Tech Bootcamp"
puts "\t\t\t\t~ partly based off of https://github.com/education/teachers_pet"
puts " Commands:"
puts "\t\t~ setup sets up a tbgit environment. See decription below"
puts "\t\t~ push pushes all local student branches to their remote master branches"
puts "\t\t~ pull pulls all remote master branches to local student branches"
puts "\t\t~ merge merges a specified branch with each student branch and then commits the changes"
puts "\t\t~ status runs `git status` on each students branch and displays the results"
puts "\t\t~ each executes a specified series of commands on each local student branch"
puts "\t\t~ spec runs rspec on specified files in a students repo"
puts ""
puts "\t\t~ add-webhooks adds webhooks (on push events) to all student repositories"
puts ""
puts "\t\t~ add-remotes adds each student's repository as a remote"
puts "\t\t~ create-locals creates a local branch to track the students remote master branch"
puts "\t\t ^----> these are both part of the setup process"
puts ""
puts "\t\t** Run `tbgit COMMAND --help` to view specific options for each command **"
puts ""
puts "\tTBGit Environment"
puts "\t\t~ it's a regular git repository -- with lots of fancy features!"
puts "\t\t~ there is a master branch for teachers to work off of (create hw files, etc..)"
puts "\t\t\t--> teachers can obviously create and work off other branches if desired"
puts "\t\t~ each student's repository is a remote of the git repo"
puts "\t\t~ there is a local branch to track each student's remote master branches"
puts ""
puts "\tSetup"
puts "\t\t1. Teachers create the student repositories (https://github.com/education/teachers_pet works perfectly well for this)"
puts "\t\t\t--> make sure the repos are all private, but that you have access to them!"
puts "\t\t\t--> initialize these repos with a README or push out a starter file."
puts "\t\t\t--> create a file with a list of the students github usernames (one on each line)"
puts "\t\t\t\t--- you will need this during the setup process"
puts "\t\t2. Teachers create a repo for themselves. This will serve as the base for the tbgit environment."
puts "\t\t3. Change to that repo's directory, execute `tbgit setup`, and follow the instructions."
puts ""
puts "\tA Typical Workflow"
puts "\t\t1. Teachers create the assignment (on the master branch) and make a final commit when they're ready to deploy it"
puts "\t\t2. Teachers pull all the students' repos to make sure they're up to date."
puts "\t\t\t--> `tbgit pull`"
puts "\t\t3. Teachers merge their master branch with each student's local branch"
puts "\t\t\t--> `tbgit merge`"
puts "\t\t4. At this point, teachers should check to make sure their were no merge conflicts. If there were, go in and fix them."
puts "\t\t\t--> feel free to `git checkout <username>` a few different branches"
puts "\t\t4. Teachers push each students local branch to the student's remote master branch"
puts "\t\t\t--> `tbgit push`"
puts "\t\t5. Make sure it worked. Do a victory lap."
puts ""
puts "\t\tTo view student solutions at any point, just `tbgit pull` and `git checkout <username>`"
puts ""
end
|