Skip to content

nguyetdoan10/learngit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Demo git

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published