On 3/6/19 at 10:30am, I attended the North Carolina Computer Instructor Association Conference Session Introduction to Git and GitHUB at East Carolina University’s SCITech Building in Greenville, NC. This was presented by Michael Schore of Wake Technical Community College.
Introduction to Git and GitGUB
- Without VCS (a version control system), there are problems when you overwrite a file.
- Why is it good, why use it and what is it?
- Who should use it?
What is a version control system
- It Tracks changes to files, especially text files
- Source code for every piece of software or code library is written or has been written in some form of text
- VCS is also called source code management (SCM)
A version control system is really just a way to take care of added text and then to catalog and understand what text was added, when, and by whom.
History of GIT
Version Control Systems really got their start as coding back in 1972 – SCCS (AT&T). Any participants in the class working then? A few. At the time, attendants were using fortran or punch cards.
1982 RCS much higher performance.
1986 –cvs concurrent use was an issue though
2000 – apache tracked as a subdirectory
2005 – linus torval. Replaced proprietary bitkeeper SCM
What is a version control system (VCS) Good For?
Think about the tracking required for software or web environment. How many files might be in a basic bootstrap environment? 10? 30?
Initializer.com will assist you in making a basic website with GRID, BOOTSTRAP, etc. Choose one, and it will spit out the basics needed to begin that type of website. Easy, but if you don’t know how to code this, not helpful. Many students may feel initially that using a system like this is smart, helpful, and saves them time, but unfortunately if they do not understand the coding it takes to see, use, change, and adjust this material, they don’t really know how to upkeep the websites they’ve started. In the end, they feel disheartened, upset, and as if they’ve wasted valuable time. Many will choose to have failed rather than put in the time end effort to learn what they have missed.
Without version control in the classroom, students do not always have the steps that many employers would like to have from new employees. Students with an understanding of version control software can quickly and easily move into a software or coding environment, while those without the experience may find themselves having to learn on the job.
Students have excuses, but an online version control system bypasses many of these. If the dog ate their flash drive, the computer fell from the table, etc., anecdotal evidence notwithstanding, having versions of materials available online allow them to go anywhere. They can go to the school lab and work on their materials. They can go directly to the classroom and begin working on it without pause.
Are Our Students Prepared? Are We Preparing Them?
Modern workflow options require us to ask: Are we really preparing students for jobs in the workplace? If we are teaching students to work on local machines, is this really the industry standard anymore? This opens us up to problems like those noted above. Transportation issues, mechanical and electronic failure, home wi-fi or general connection issues, windows and software updates, etc., can all be blamed without a cloud-based server or version control system. If the students cannot produce the class files at class time, its a real problem
Using GIT and GITHUB is something which can be used to assist students in job availability and preparedness. Employers in coding or web design & development can learn a great deal from a GitHUB. They can see how many updates the students have made, how many active files students are using, how many adjustments they’ve made to existing pieces and how timely the responses are to requests. It allows them to see the technical writing and explanations shown, and many other pieces of material. Imagine the increase in employability this could bring to the table.
Its not all a bed of roses though. An issue with this can be some learned helplessness on the part of our younger, or online students. We need to generate students who break out of their shells and learn to solve problems for themselves. If students don’t feel they have been given a number-by-number, step-by-step approach, many will check out and simply say that they cannot fulfill the project. We need to teach them to rely on themselves and prepare themselves to solve real-world solutions.
Watch this learned helplessness video at: youtube https://www.youtube.com/watch?v=TU7RBqTndJ8
What is GIT
Starting in the fall this will be taught in the classrooms at Wake Technical Community College. Git is distributed version control available via the internet or any online connection.
- No communication requirement with a central server
- No single point of failure
- Encourages programmer involvement and “forking” of projects
- Developers can work independently
- Can submit change sets for inclusion or rejection
This allows us (both workers such as students and observers such as faculty, bosses, and the general public) to see who checked out individual files, how many lines of code were removed, as well as how many lines of code were added into the environment. It adds accountability into the online group project environment, because there is no way to mask the amount of work done, and code from one update can be checked against code from earlier updates (avoiding duplication and/or copying) as well as against later versions (avoiding duplication and reprinting materials, or having useless code removed later by others..
Who Should Use Git?
- Anyone needing to track edits in text files
- Anyone working with appropriate files in a collaborative setting
- Anyone not afraid to use command-line tools
- Types of files being worked on
- Web files (html, css, JS…)
- Web Programming (PHP, Python, Ruby,Perl, ASP…)
- Programming (JAVA, C, C++, C#, Objective C…)
- Offshoots of web languages (like coffeeScript, ActionScript…)
- Can track other types of files, but not as useful- think images, sound files, etc.
Nothing difficult about installation. It runs anywhere.
Bash, Apple and unix flavors come with Bash. Windows version installation is an option (GitBash). Having the right-click option to open GitBash from any windows explorer location is a great thing.
Systems have all been going to GUI over the years. Students are afraid of command line. This really allows us to go back to basics and add in another level of professionalism and base-level working knowledge into our classes earlier. Configuring Git is as easy as using the .gitconfig file in the configuration folder.
- Local Git config file… request slides
Visual studio code can be used as the visual editor for github. You can also use color output of git.
What is a repository? How do you create one? A repository is a place to save and store files. In a VCS, you’re trying to have a backup in case something stupid happens. If you have set up GITHUB and a repository, you can give it some information and choose a day and time to commit to those changes.
How safe is my data? How easily is it destroyed?
At its most basic, its just a file location, created on your development system.
Local repository can be set up, where your development is taking place so you can monitor and record its history.
Remote repository can also be set up, a place where your files can be saved as above, but offsite.
Creating A Repository
There is no free lunch. Once git is installed on your computer, its pretty simple to do. Looking at a typical website:
- Using Git, initialize the project
- Looking at the directory, we now see a .git file added and a (master) line added.
At this point in the lecture, we did some hands-on work with GIT to use the materials firsthand. It was a little technical, so I have included the slides as I was not able to type during this time.
- Commit chmessage in example was very simple
- Commit messages should be a descriptive message about the changes
- Start with simple single line – 40 to 50 characters
- Add more lines as needed but less than 70 characters
- Keep messages in the present tense, not past tense
- Bullet points using asterisks
- Add bug number and tracking numbers in the material to be ready for business standards
Understanding GIT Architecture
Repository >> working >> git add file.html ?? staging >> git commit file.html >> repository
Again, this example was pretty hands-on, so I didn’t have much time for notes and notation.
Find some introductory GIT training and walk though it a few times. Teacher training to master GIT and Git GUB training via https://education.github.com
Push the workflow ideas on the students. A student who understands GIT can easily understand and pickup the other repository functions. Whatever system suits the company Is the one they’ll use. Think it might be a passing phase? Microsoft bought GITHUB for 7.5 Billion last year.
Where will this go? We’ve recently added in educational contracts with GITHUB and Wake Tech. This allows us a bit of flexibility but can be difficult as it requires schools to work alongside an entity like Microsoft which is itself incredibly large.
GITHUB Campus Advisor program
- As a Github Campus Advisor, you’re not only a master, but a champion of real-world tools at the School.
- Unlock benefits provided by Github, including a free Github package to meet the needs of your school?
- Event support, workshop kits and fresh swag delivery every semester
- Early access to new education features and materials from GitHub education
- Special invitations to github education events
- Github camps advisors-only gear and special swag