Skip to content

Latest commit

 

History

History
143 lines (103 loc) · 8.29 KB

git-resources.md

File metadata and controls

143 lines (103 loc) · 8.29 KB
layout title nav
default
GIT Resources
git-resources

Introduction

Git is a distributed version control system developed by Linus Torvalds to be used for the Linux kernel development. It quickly grew to be one of the most widely used source code management systems.

In class, you have been introduced to git, GitHub and their use within the context of your project. This page will hold pointers to the introductory material and a listing of some git resources.

Learning Git

As with almost all technologies, there are two main ways to learn things: a formal introduction (takes more time) or a quick tutorial to get you going fast. Depending on what you prefer, here are some good places to start:

Formal Introduction to Git

  1. If you are new to version control, or you want to get a lightweight overview before diving into the material, start with these set of short videos:

  2. The Pro Git book is a concise discussion of git, how and why it works. The book is available freely online and licensed under CC BY-NC-SA 3.0.

    • For a basic intro to git, read chapters 1 and 2
    • Chapter 3 discusses branching which is an important aspect about git, however, it is not fundamental when you are just getting started.
  3. Git Magic is smartly written lightweight introduction git for CS students by Ben Lynn that is available for free under the GNU GPLv3 license. This book has a more practical approach and does not dive into concepts as much as Pro Git. The book is also available as a GitHub repository.

    • To get started with git, you will need to read chapters 2 and 3.
    • Chapters 4 and 5 will give you a better idea on how to use git effectively in introduce to essential git features such as branching and logs.

Tutorials

Git Cheatsheets

Git Workflow

Best Practices

GitHub Resources

Markdown

Tips & Tricks

  • When viewing a repository, you can hit "?" to bring up the list of available commands.
    • This works in most GitHub pages, not only in code repositories
    • Hitting "t", for example, will take your to the file finder
  • Hitting the blame button, will take you line-by-line/commit-by-commit in a file to see who did what and enables you to blame a specific user for a certain code segment

Special Git Topics

git ignore files

git tag

Tags are alphanumeric names given to specific commits. Essentially, bookmarking that commit for easy identification and use. The submission notes discuss the use of tags in your project-based submissions. Here are some references discussing tags:

git log

The git log command is a very powerful command that helps you inspect the history of a repository. Here are some commonly used git log variations:

FAQs

Why My Account Is Not Linked/Showing in Commits and/or Graphs?

In order to configure git properly, you need to specify not only your name, but the email address you registered with in your git configuration.

In the GitHub Setup Guide, make sure you setup your user.name and user.email properly. Your user.email should either be:

GitHub Help has a related question: https://help.github.com/articles/why-are-my-commits-linked-to-the-wrong-user