Coder Social home page Coder Social logo

saturday-test's Introduction

saturday-test

Before starting with git and github:

open the terminal and try out some basic commands: try to locate where you are, create a file, rename it and move it to another folder.

some basic commands: help pwd cd cd filename example: cd Desktop ls open . cd .. git log ...

Install Git

  • two ways to install git:
  1. Go to git-scm/download and download the packade you need for your OS
  2. Open terminal and use following commands: sudo apt-get update sudo apt-get upgrade sudo apt-get install git

Sudo apt

  1. check if git is installed on your computer by using the command: git git --version

Configure git

  1. SSH key <!--- this will store pasword of github so you dont have to do it every time you want to push, pull,...---> open terminal and use following command to generate a ssh key: ssh-keygen -t rsa -b 4096 -C "[email protected]"

copy the key you generate and paste it on your github account. there are two ways to copy: - ctrl+C or cmnd+C - use following command on terminal: pbcopy < ~/.ssh/id_rsa.pub

Use git

from github to git

you need a repository to use git. A repository is a folder in your local computer. On github you also work with repositories.

  1. got to your github account and create a new empty repository you can choose to create a readme.md file with it. When you create the repository you create a URL. it can be http or shh.

  2. copy the URL link

  3. open terminal and use command: git clone (add url you want to clone)

  4. command open .

  5. Make a change in the readme file and save>

  6. command git status if you made changes on git and hit save you still need to add and commit it. Use git commit -a -m "message"

when you commit for the first time, the terminal will ask you who you are. Use following commands:

git config --global user.name "your name" git config --global user.email "email adress"

if you want to check if it worked

git config --list

if you type git status it will make the commit

Push to github

once you commit changes on your local files. you will want to have the same changes to your github repository. use following commands:

git push git remote git remo -v git push origin master

from git to github

now we create a repository on the local computer. create a folder woth your documents.

command cd (directory you want to want to turn into repository ) git init git status

git add (filename or folder) git commit -m "#" git status

if we want to push to github: go to github and create a new empty repository (no readme file) command git remote add origin ( you dont have to call it origin) 'url of github repository'

now if you: git push origin master

saturday-test's People

Contributors

bennami avatar

Watchers

James Cloos avatar  avatar

Forkers

samirabelkhiri

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.