O slideshow foi denunciado.
Seu SlideShare está sendo baixado. ×
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Próximos SlideShares
Git
Git
Carregando em…3
×

Confira estes a seguir

1 de 157 Anúncio

Mais Conteúdo rRelacionado

Diapositivos para si (20)

Quem viu também gostou (18)

Anúncio

Semelhante a Git (20)

Anúncio

Mais recentes (20)

Git

  1. 1. GIT
  2. 2. MAYANK PATEL APPLICATION ARCHITECT - OILDEX, A SERVICE OF TRANSZAP /Linkedin @maxy_ermayank
  3. 3. What is Git?
  4. 4. Performance
  5. 5. Flexibility
  6. 6. Version control
  7. 7. Why Git?
  8. 8. Distributed Development
  9. 9. Faster Merge Cycle
  10. 10. Git for marketing
  11. 11. Git for product management
  12. 12. Git for designers
  13. 13. Git for customer support
  14. 14. Branching is Cheap
  15. 15. Git is the New Standard
  16. 16. Huge Community
  17. 17. Security
  18. 18. Encryption
  19. 19. Two factor authentication
  20. 20. Team permissions
  21. 21. Organization permissions
  22. 22. Fork permissions
  23. 23. LDAP/SAML/CAS
  24. 24. Audit - User actions
  25. 25. Audit - Git actions
  26. 26. Features
  27. 27. Code search
  28. 28. Pull requests
  29. 29. Inline editing
  30. 30. Markdown support
  31. 31. @mentions
  32. 32. Inline rendering of PDF les
  33. 33. Image diffs
  34. 34. Integration with plenty of tools
  35. 35. Tooling
  36. 36. Real Time Noti cation
  37. 37. History
  38. 38. Wiki
  39. 39. Social
  40. 40. Discussions
  41. 41. HipChat Integration
  42. 42. JIRA Integration
  43. 43. DEVELOPMENT INFO Branch Commit Pull Request
  44. 44. Git & CI
  45. 45. Run builds from your feature branches
  46. 46. Git Work ows
  47. 47. Can we still x a bug for the Release?
  48. 48. How do we do Hot x for the current version?
  49. 49. Is the code for the Feature complete?
  50. 50. Has everyone reviewed the code for this feature?
  51. 51. Centralized provides the closest match to common SVN processes, so it's a good option to get started.
  52. 52. Git ow A Git ow work ow is a more formal, structured extension to feature branching, making it a great option for larger teams with well-de ned release cycles.
  53. 53. AdHoc
  54. 54. Forking (Public GitHub) Finally, consider a forking work ow if you need maximum isolation and control over changes, or have many developers contributing to one repository.
  55. 55. Feature Branch Building on that idea, using a feature branch work ow lets developers keep their work in progress isolated and important shared branches protected. Feature branches also form the basis for managing changes via pull requests.
  56. 56. A SUCCESSFUL GIT BRANCHING MODEL
  57. 57. Generating and Add SSH Key
  58. 58. Let's get to Work now
  59. 59. Create a new local repository git init
  60. 60. Clone Repository
  61. 61. Create a working copy of a local repository git clone /path/to/repository
  62. 62. For a remote server, use git clone username@host:/path/to/repository
  63. 63. Remote
  64. 64. Connect to a remote repository git remote add origin server
  65. 65. Create a new local repository git remote -v
  66. 66. Remove Remote git remote remove upstream
  67. 67. Staging Changes
  68. 68. Staging a le git add lename
  69. 69. Staging all changes for commit git add * OR git add -A
  70. 70. Staging changes on Directory path git add .
  71. 71. Commit
  72. 72. Commit changes to head (but not yet to the remote repository) git commit -m “Commit message”
  73. 73. Commit any les you‘ve added with git add, and also commit any les you’ve changed since then git commit -a
  74. 74. Pull git pull upstream branchname
  75. 75. Push git push origin branchname
  76. 76. Status git status
  77. 77. Branches
  78. 78. Create a new branch and switch to it git checkout -b branchname
  79. 79. Switch from one branch to another git checkout branchname
  80. 80. List all the branches in your repo, and also tell you what branch you're currently in git branch
  81. 81. List all the branches including remote branches in your repo, and also tell you what branch you're currently in git branch -a
  82. 82. Delete the feature branch git branch -d branchname
  83. 83. Delete a branch on your remote repository git push origin :branchname
  84. 84. Push the branch to your remote repository, so others can use it git push origin branchname
  85. 85. Push all branches to your remote repository git push —all origin
  86. 86. Update from the remote repository
  87. 87. Fetch and merge changes on the remote server to your working directory git pull
  88. 88. To merge a different branch into your active branch git merge branchname
  89. 89. View all the merge con icts:View the con icts against the base le:Preview changes, before merging git diff —base lename git diff sourcebranch targetbranch
  90. 90. After you have manually resolved any con icts, you mark the changed le git add lename
  91. 91. Tags
  92. 92. You can use tagging to mark a signi cant changeset, such as a release git tag 1.0.0 commitID
  93. 93. CommitId is the leading characters of the changeset ID, up to 10, but must be unique. Get the ID using git log
  94. 94. Push all tags to remote repository git push —tags origin
  95. 95. Undo local changes
  96. 96. If you mess up, you can replace the changes in your working tree with the last content in head:Changes already added to the index, as well as new les, will be kept. git checkout — lename
  97. 97. Instead, to drop all your local changes and commits, fetch the latest history from the server and point your local master branch at it, do this git fetch origin git reset —hard origin/master
  98. 98. Search the working directory for foo() git grep “foo()”
  99. 99. Other Usefull Commands git rm git mv git diff git log
  100. 100. .gitignore Anything that not supposed to be in your Repository should be added to .gitignore le
  101. 101. Glossary
  102. 102. Version Control
  103. 103. Repository
  104. 104. Fork Full copy of main repo under your user space
  105. 105. Clone Copy of Repo
  106. 106. Branch
  107. 107. Master Release Candidates / Production ready code
  108. 108. Develop Continuos Integration Branch (Unit Test, Integration tests)
  109. 109. Pull Requests (To contribute your changes)
  110. 110. Merge
  111. 111. Tag
  112. 112. Working Tree
  113. 113. HEAD
  114. 114. Hook
  115. 115. Code Review
  116. 116. Maintainer
  117. 117. Reviewer
  118. 118. Contribute
  119. 119. Collaborator
  120. 120. Upstream
  121. 121. Work ow for us
  122. 122. Create Repository
  123. 123. Create Develop branch
  124. 124. Set Develop as default branch
  125. 125. Add Collaborator
  126. 126. Fork
  127. 127. Clone git clone git@github.*.com:mpatel/welcome.git
  128. 128. Add Remote Upstream Check Remote (git remote -v) git remote add upstream git@github.*.com:mainOrganization/welcome.git origin git@github.*.com:mpatel/welcome.git (fetch) origin git@github.*.com:mpatel/welcome.git (push) upstream git@github.*.com:mainOrganization/welcome.git (fetch) upstream git@github.*.com:mainOrganization/welcome.git (push)
  129. 129. Fetch git fetch upstream
  130. 130. Pull to update your local develop git pull upstream develop
  131. 131. Check out a feature branch from develop git checkout -b OPL1212KeepMeSignedIn
  132. 132. Do work in your feature branch, committing early and more often
  133. 133. Stage changes with commands git add
  134. 134. Commit with commands git commit
  135. 135. Push git push origin OPL1212KeepMeSignedIn
  136. 136. Create Pull Request from mpatel/welcome OPL1212KeepMeSignedIn branch to mainOrganization/welcome Develop branch
  137. 137. Review
  138. 138. Merge frequently to incorporate upstream changes
  139. 139. Interactive merge
  140. 140. Merge your changes with Develop
  141. 141. Push your changes to the Upstream
  142. 142. Delete Feature Branch git branch -D OPL1212KeepMeSignedIn
  143. 143. Push deleted branch from your remote copy git push origin :OPL1212KeepMeSignedIn
  144. 144. Branching and Release Strategy
  145. 145. Feature Branches Create Branch from Develop Merge into Develop
  146. 146. Release Branches Create Branch from Develop Merge into Master and Develop
  147. 147. Hot x Branches Create Branch from Master Merge into Master and Develop
  148. 148. BEST PRACTICES Use a descriptive commit message Link Commits to Issues (Feature, Bug, Task) Make each commit a logical unit Incorporate others' changes frequently Share your changes frequently Don't commit generated les
  149. 149. RESOURCES Pro Git Try Git right in your web browser Smart Commit commands Online Training Markdown Cheatsheet GitHub Enterprise Resources A successful Git branching model GitHub Help Git-SCM
  150. 150. Thank You!!!

×