Advertisement
samimwebdev

Introduction to git and Github

Feb 28th, 2022
219
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.57 KB | None | 0 0
  1. Version(software development project) Control System-VCS(A Developer's Friend)
  2. ============================================
  3. Save a project(Taking snapshot) on a specific point(Adding Feature and save a version)
  4. -Adding new feature
  5. -Modify extsing feature
  6.  
  7. * A Life Lesson - 6 hours
  8. - 2 hours(simpler version)
  9. - 2 hours(3D version)
  10. - 2 hours (old version)
  11.  
  12.  
  13. - Remote VCS server (GitHUB)
  14.  
  15.  
  16.  
  17.  
  18. Software Development workflow
  19. ===============================
  20. Facebook (Demo)
  21. -status management(branch)
  22. - image upload (version)
  23. - Link Management (version)
  24. - React System (version)
  25. - comment management
  26. - notification management
  27. - personal Profile management
  28. - Group management
  29. - page Management
  30.  
  31. ** Working with GIT(Local version management)
  32. - Install git(git-scm.com)
  33. - configure git
  34. -git config --global user.name 'name'
  35. -git config --global user.email 'email'
  36.  
  37. Working Dir Staging area commit(saved a version)
  38. ============ =============== ====================
  39. index.htm git add fileName git commit -m '' 'Message'
  40. main.js git add . git commit -am **
  41.  
  42.  
  43. ** Github is remote version of local Git feature management
  44.  
  45.  
  46. *Some Important command
  47. - git init
  48. - git status (see files in staging area)
  49. - git log --oneline (show Log with commit and message)
  50. - git show commit_version
  51. - git reset
  52. - git reset --hard
  53. - git checkout version
  54. - git branch
  55. - git checkout branchName
  56.  
  57. * Let's go live using github pages
  58. - git clone(github)
  59. - git push -u origin branchName(github)
  60. - git pull (git fetch + git merge)
  61. * Gitignore (Hide your Secret by ignoring files )
  62.  
  63.  
  64. **Centra VCS or Distributed VCS vs Local VCS
  65.  
  66. central VCS (central place)
  67. Distributed VCS(github)
  68. - whole version dealt locally
  69. local VCS
  70.  
  71.  
  72.  
  73. //skipping staging area(directly save a version) -tracked and modified
  74.  
  75. git commit -am 'message'
  76.  
  77. - staged/unstaged change(git diff)
  78. git diff - show changes from working directory
  79. git diff --staged - show changes from working directory in staged area
  80.  
  81. 1. Undo your Change
  82. - git revert commit_number /HEAD
  83. - git commit --amend
  84.  
  85. Exiting unix editor
  86. I - Insert
  87. ESC - :wq
  88.  
  89. 2. working with open source repositories
  90. another person - Fork - own Github profile - clone (modify) - update to own github profile - pull request - owner github repo - review by open source project maintainer - merge to the open source project
  91.  
  92. 3. Markdown
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement