Code Monkey home page Code Monkey logo

learngit's Introduction

This project is just a demo how to use git

  1. git init

  2. git status

  3. git add

  4. git commit

  5. git log

  6. git show

  7. git diff

  8. working directory

  9. staging area

  10. git repository

  11. git checkout --

  12. git reset

  13. git checkout -b (branching)

  14. git checkout

  15. git merge

  16. git reset --soft <to_commit>

  17. git reset --mixed <to_commit>

  18. git reset --hard <to_commit>

  19. git revert

  20. gitignore

  21. git clone

  22. git pull

  23. Pull request

    1. git checkout -b <feature_branch>
    2. git push origin
    3. create a pull request on Github
    4. review code
    5. merge to master

//Resolve conflicts When will conflicts happen? 1. Changing the same file + same line 2. A deleted file X, B modified file x

  1. Method 1:

    1. Using 'git rebase'
    2. Resole conflict
    3. Push again with -f
  2. Method 2:

    1. Merge updated master to feature branch
    2. Resolve conflict
    3. Commit and push

learngit's People

Contributors

nguyetdoan10 avatar nguyet1010 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.