Skip to content

csulb-cecs/gitintro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

gitintro: an introduction to Git

Install

Check whether you have Git installed. If you need it, then, download Git and install it.

Signup for GitHub

GitHub is a host of Git repositories, both public and private. There are other hosts of Git repositories, including BitBucket by Atlassian.

Download GitHub Desktop App

There are many Git clients to use with your Git repository. GitHub provides a GUI client, which is what is used in this workshop. Download the GitHub Desktop App to follow along with the workshop.

Workshop Outline

  1. Create repository on the GitHub website. Relevant commands: git init
  2. Clone the repository on your computer. Relevant commands: git clone
  3. Add new files or edit existing files on the repo... relevant commands: git add and git status
  4. Commit files in staging area to repository... relevant commands git commit and git log
  5. View differences
  6. Resolving conflicts
  7. Ignoring files (E.g.: never commit compiled code to repository)... See ignoring files on GitHub Help
  8. Use branches

Git Best Practice

  1. Use small commits. If you are fixing two different bugs, use two different commits. Small commits are easier for everyone in the development team to understand.
  2. Commit often.
  3. Do not commit broken work. Test code before commit.
  4. Write meaningful commit messages
  5. Use branches.
  6. Use Pull requests to alert other developers you've completed some work and you want them to review it. See GitHub Help on Pull Requests

About

Git: an introduction

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages