Code Monkey home page Code Monkey logo

git-guide's Introduction

Git Guide

An introduction to the Git version control system designed for Singapore Polytechnic's DIT SEP module.

Objectives

This guide aims to provide developers with a broad understanding of the Git version control system and a common Git workflow. It does not go into depth with a wide variety of more complex Git commands. Those can be picked up once you have developed an intuition for Git.

Git is a vast topic and it will be impossible to cover the entirity of the Git tooling in a single session. Additional resources have been added below for your reference. You are encouraged to explore beyond what is taught to better understand the tool.

While this guide was written with the students of DIT in mind, it is applicable to all other developers who are new and wish to learn more about Git beyond just memorising a set of commands to type.

Usage

To get the most out of this guide, it is recommended that you give chapters one to five a thorough read. Each chapter tackles a different aspect of Git and relies on knowledge of prior chapters to accelerate your learning. Chapter six to eight are optional when starting out but they cover slightly more advanced topics in Git that may come in handy in the future.

However, as with anything relating to programming, the best learning is always independent learning. So as much as each chapter provides basic exercises for you to follow along, you will benefit the most from playing around with each chapter and trying out different variations of commands to gain a firm grasp of what they do.

Table of contents

  1. Setup
  2. First repository
  3. First commit
  4. Collaborating with others
  5. Merge conflicts
  6. (Optional) Branching - WIP
  7. (Optional) Advanced topics - WIP
    1. Git Log
  8. (Optional) Basic bash commands

Recommended resources

Updates

  • 26 June 2020 - First release of guide, chapters six and seven are not completed yet
  • 07 July 2020 - Work started on first advanced chapter - 07-01: git log. Credits to @chuanhao01 for working on this!
  • 14 July 2020 - First advanced chapter (git log) added! Thanks to @chuanhao01 for helping!
  • 01 August 2020 - Added the first draft of the site using Gatsby.js!

git-guide's People

Contributors

chuanhao01 avatar woojiahao avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

git-guide's Issues

Guide contents planning

Hey Jia Hao, trying to get used to using Github to do open source.

For the next chapter, what do you think is the number 1 thing to add? (Asking to see which one to help out one first)
Personally I think I can help out with the:

  1. git fetch and git merge and why they should be used vs git pull
  2. git deep dive (Although I not sure if everything I know so far is 100% correct haha)

As for git blame and git diff I have not used those much myself so I am not really confident about those.
I mainly use git diff for seeing differences in index vs working dir.
I think I used git blame like once or twice?

On a side note, I got an idea for like a tips and tricks section (Although maybe it could be various parts of the other sections chapter's sections)?
Kinda like things we usually do for our git setups.
(Did not have time to check through all of these things yet if they appeared before)
This came to me when I had to configure git multiple times on different systems :D.
Things like:

  1. git configs
    1. The core.pager
    2. The credential.helper
    3. The core.editor
    4. username and email
  2. git gpg commit signing (Prob not a very common thing)
  3. Using aliases to shorten git commands
  4. oh-my-zsh and powerlevel10k showing of git status in the terminal prompt
    image

There are probably more things but I think I'm forgetting them.
Would love to hear your thoughts on this :D

Edit: Some grammar, vocab and clarrification

Local URLs lead to 404s due to absolute pathing

The git book is hosted at https://woojiahao.com/git-guide which causes absolute URLs (i.e all of the local URLs within the site) to resolve to 404s.

The paths in the sidebar should probably be updated to be relative (like href="01-setup"), or include the full base URL to always resolve correctly (like href="https://woojiahao.com/git-guide/01-setup").

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.