Giter VIP home page Giter VIP logo

incore-session-on-git's Introduction

Introductory Session on Git and GitHub

Incore session on Git and GitHub.

Table of Contents

Requirements

  1. git
  2. GitHub Account
  3. A Text Editor - VSCode

Why GitHub?

  • What is Git?
  • What is GitHub?
  • Importance of Github
  • What is a remote repository?
  • What is a local repository?

Using Git

  • Basic Commands:
    • git init
    • git add
    • git commit
    • git push
    • git pull
    • git status
Live Demo
- Create a Repository
- Add collaborators (groups of 2)
- Clone the repository
- Open the repository on VSCode
- Make changes to the repository (target.md).
- Pull the changes made by others.
- Push to remote repository
  • Other Useful Commands:
    • git branch (concept, Forks)
    • git checkout
    • git remote (concept)
    • git merge
    • git reset
    • git diff
Live Demo
- Merge conflict demonstration
- Fork main repository
- Clone the Forked repository
- Create a branch and checkout to that branch
- Push the branch (--set-upstream)
- Checkout to master and merge the new branch
- Push to master
- Add remote to main repository
- Pull from main repository
- Make Pull Requests
  • Setup:
    • Personal Information: git config
    • Ignore: .gitignore

GitHub

  • What's .md (Markdown)?
  • Pull Requests
  • Issues
  • Community Convention:

Check this for reference

* Description (and Tags)
* README
* CONTRIBUTING
* PULL REQUEST TEMPLATES
* ISSUE TEMPLATES
* CODE OF CONDUCT
* LICENSE

CodeHub

Most frequently used commands:

Structure: git <operation> <options> <parameters>
Help: git --help

git init
git add . OR git add <file/folder-names>
git commit -m "message"
git pull
git push

git branch <branch-name>
git checkout <branch-name>
git merge <branch-name>
git branch -d <branch-name>
git branch -D <branch-name>

git diff
git log
git status
git fetch

git remote add <remote-name> <url>
git remote rm <remote-name>

git stash
git stash clear

git reset HEAD
git reset ^HEAD
git reset --hard

incore-session-on-git's People

Contributors

roerohan avatar theprogrammerdavid avatar

Watchers

 avatar

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.