Code Monkey home page Code Monkey logo

git-demo's Introduction

Intro to Git

1: Reasons to use Git/GitHub

  1. Backing-up your work
  2. Tracking changes
  3. Collaborating on work with others
  4. Making work public

2: What is a git repository?

A directory containing:

  1. The files being tracked
  2. A subdirectory called .git containing:
    1. The data needed to move back (and forward) through the tracked changes.
    2. The data needed to move between branches (alternate histories of the tracked files)
    3. Configuration data (username, location of a remote version of the repository, etc.)

3: What is git?

Software to manage a git repository and syncronise local and remote copies.

4: What is GitHub

  1. An place to store remote copies of git repositories.
  2. A suite of tools to manage remote repositories and collaborate with others on them.
  3. More tools to do things with the contents of remote repositories (github actions, github pages, etc.)

Other alternatives include GitLab, Bitbucket etal.

5: Installing Git

Install Git

6: Essential git commands

  1. git clone
  2. git add
  3. git commit -m
  4. git push
  5. git pull

7: A typical git/Rstudio workflow

  1. Have some work to start tracking with git.
  2. Create a new repo on GitHub.
  3. Start a new project in Rstudio.
  4. Move files to new folder.
  5. Commit files.
  6. Push the changes.

8: Writing good git commit messages

  1. Title + description (optional).
  2. Use active future tense for title.
  3. Start title and description with uppercase letter.
  4. Don't end the title with a full stop (do end the description with one though).
  5. Use a title with 50 characters or less.
  6. Blank line after title.
  7. Use hard line endings at 50 characters or less for the description

Example commit message

Add a new README file

Have added a new README file that describes how
one can use git/GitHub. The README includes an
example of making a commit message.

9: Next steps

  1. Using git branches
  2. Issues
  3. Pull Requests
  4. GitHub Actions
  5. GitHub Pages

git-demo's People

Contributors

wkmor1 avatar

Watchers

James Cloos avatar  avatar

git-demo's Issues

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.