Git Product home page Git Product logo

git-intro's Introduction

git-intro

A repository for hands-on tutorial for Git and GitHub

Intro to Git and GitHub

Bash commands we'll use

  • cd : change directory
  • cd .. : move up to the parent directory
  • pwd : print working directory
  • cat : "concatenate", used to print the contents of a file

Basic git commands for working on our local repo

  • git init : initialize a new git repo
  • git status : lists files/folders that are unstated/staged, untracked, deleted - do this often!
  • git add : add specified file(s) to staging
  • git add . : add all edited files to staging
  • git commit -m “commit message” : commits all staged changes (hint: Keep related changes together in one commit. Commits allow you to roll back and track your work, so try to commit every time you complete a task.)
  • git log : prints a log of your commit history

Git commands for working with branches

  • git branch [name] : creates new branch
  • git checkout [branch name] : switches to branch
  • git merge [branch to be merged] : merge commits into current branch
  • git branch : lists all branches
  • git branch -d [branch name] : delete branch

Git commands for working with remotes

  • git clone : clone a remote repo to local
  • git push : pushes commits to remote repo
  • git pull : pull commits from remote repo

Concept Map

Basic Git Concepts

git-intro's People

Contributors

dsgsgsits avatar mooocer avatar spyder-nj avatar justgithub28 avatar labhayamsharma avatar rishichawla avatar naman-juneja avatar nan238agrawal avatar nehapahuja29 avatar rubin1603 avatar samikshaagrawal avatar jainsrijan avatar sriyanshjain 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.