Giter VIP home page Giter VIP logo

github_learning's Introduction

HOW TO USE GITHUB ON UBUNTU

  1. Install github
    sudo apt-get install git
  2. Cofig github
    git config --global user.name "user_name"
    git config --global user.email "email_id"
  3. Create local repository
    git init "repo_name"
    cd "repo_name"
  4. Create README file
    gedit README, write something
  5. Index file/add file to the staging area
    git add README
  6. Remove files
    git rm file_name  # remove file_name from local and repo
    git rm --cached file_name  # remove file_name from repo ONLY
  7. Check repo status
    git status
  8. Commit changes
    git commit -m "note"
  9. Create a repo at github.com
  10. Connect to the created repo
    git remote add origin https://github.com/user_name/repo_name.git
  11. Upload/push local files to the github repo
    git push -u origin master
  12. Pull down changes
    git pull origin master
  13. Check differeces
    git diff
  14. Create a new branch
    git branch branch_name
  15. Delete branch
    git branch -d branch_name
  16. Switch branch
    git checkout branch_name
  17. Merge branch
    git branch des_branch # switch to destination branch (the branch to be merged)
    git merge src_branch # merge (des_branch will be a copy of src_branch)
  18. Skip enter user and pw every pushing
    $ git config credential.helper store
    $ git push http://example.com/repo.git
    Username: <type your username>
    Password: <type your password>

github_learning's People

Contributors

nhduong avatar

Watchers

Tai Do 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.