Coder Social home page Coder Social logo

git-workshop's Introduction

git-workshop

Getting started with git

Downloading git for your local machine

For linux

$ sudo apt-get update
$ sudo apt-get install git

For Mac

brew install git

For windows, download git from the following source - https://gitforwindows.org/

to check if git is successfully installed, type git in your terminal and you should see a bunch of functions appear from it

Configuring git

substitute the following with your details of your github account

$ git config --global user.name "Emma Paris"
$ git config --global user.email "[email protected]"

Basic functions

  1. Creating a local repository - go to the directory which you want to make a git repository
$ cd myproject
$ git init
  1. Checking tracked and untracked files
$ git status
  1. Adding changes to be tracked

Either a file can be added or all files can be added

$ git add <filename>
$ git add .
  1. Committing a change

Once the changes are added, the changes can be committed, which means you are sealing them, in order to do so

$ git commit -m "YOUR COMMIT MESSAGE"
  1. Pushing the file to your online repository on github.

To do this we set the

git remote add origin <URL OF REPO>
git push origin master
  1. Getting changes from the remote
git pull

git-workshop's People

Watchers

James Cloos 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.