Giter Site home page Giter Site logo

gitbase's Introduction

Work with git.

Setup git https://git-scm.com/downloads

Create repository locally

Enter to dir and open command line.

git init
echo "info about this project" >> README.md

Add file index.html

git status

Add file script.js

git add .
git status
cls

Commit

Change index.html

git status
git add index.html (or git add.)
git status
git commit -m "new index script"

Ignore

Add file errors.txt

git status

Add file .gitignore
To file add line errors.txt

git add .

Add dir logs and file logs.txt
Change .gitignore add \logs

git add .
git commit -m "added .gitignore"

Branch

git status
git branch
git branch test
git branch -D test
git branch readme
git branch
git checkout readme
git checkout master
git checkout -b new (creation and transition to the branch)
git checkout readme
git branch -D new

Merge

Add to dir file readme.md

git status
git add .
git commit -m "created readme.md"
git checkout master ( we do not see readme.md )
git checkout readme ( we see readme.md ) 
git checkout master
git status
git branch
git merge readme
git branch -D readme

Remote

On GitHub add repository TestDoc

git config --global user.name "***"
git config --global user.email "[email protected]"
git remote add origin https://github.com/AlexFromKiyv/TestDoc.git
git push -u origin master

Change file script.js

git commit -m "updated script.js"
git push

Change file script.js

git add script.js
git commit -m "updated script.js"
git push

Clone

Create dir NewProject

cd NewProject
git clone https://github.com/AlexFromKiyv/TestDoc.git

Open in VSC folder Change script.js Open dir in console

git add .
git commit -m "change script.js"
git pull

Markdown https://www.markdownguide.org/cheat-sheet/

gitbase's People

Contributors

alexfromkiyv 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.