Giter Site home page Giter Site logo

project1's Introduction

Git basics

Recap of the previous class

  • git init

  • git status

  • git add .

  • git commit

  • combining the commands >> git add. | git commit -m 'started project with readme' 156 git show 157 git checkout master 158 git checkout master 159 git branch mikhail1 160 git branch mikhail2 161 git branch mikhail3 162 git branch 163 # git branch name - create new branch without switching to it 164 # git checkout -b name - creates new branch with switching to it 165 # git branch - shows all the branches 166 # git checkout name - switching to a different branch 167 history | tail -10 168 history | tail 169 history 170 history | tail -15 >> README.md

  1. basic
  2. github exercises

hello text

  • some bullet points here

hello

hello

text body

Take aways from git sessions

  • local
  • create a git repository: create a folder, initialize git (tracking) ''' git init

add some files (text, python etc.) or update, add all file to tracking system (git)

git add. git commit -m 'meaningdule message that summirezes your changes'

if you want to publish: create repo in github, copy the url that ends with .git

get set-upstream origin url git push

add files to '.gitignore' exclude from tracking and publishing to the cloud repository

cat >> .gitignore data/ mynotes.txt

publish ignoring mentoined files or directories

git push

  • Branching
  • git branch # list all existing branches
  • git branch newbranch # create a new branch and not switching
  • git checkout - b newbranch # creating and switching to new branch
  • git checkout branch # switching to existing branch
  • Working with github
  • git clone url.git # clone brand new project from the cloud
  • git push # publish the changes from your local to cloud
  • git pull # get the updates from cloud repository

Working with class file, get updates and make changes in your branch

  1. clone the repository from asotools ''' git clone cd newrepo git checkout -b 'yourbranch' '''
  2. make changes in your repository, local changes.
  3. Go to your github account, create a new repository to save YOUR changes
  4. Get the URL of that repositry from GitHub
  5. Set the your branch upstream to your GitHub repository that you just created. ''' git push --set-upstream '''
  6. To get the updated from asotoolsny repository, switch to master branch and then git push ''' git checkout master git pull '''
  7. To get new changes from updated master to your branch: ''' git rebase master ''' testing pull command

project1's People

Contributors

mikhail1401 avatar

Watchers

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