Git workflow libre semikov

3,619 views

Published on

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,619
On SlideShare
0
From Embeds
0
Number of Embeds
5
Actions
Shares
0
Downloads
0
Comments
0
Likes
4
Embeds 0
No embeds

No notes for slide

Git workflow libre semikov

  1. 1. Git workflow mini training Andrey Semikov, EPAM Systems
  2. 2. Roadmap for the GIT starter1) Generating ssh keys2) Create your own branch3) Resolving the conflicts4) Merging5) Stash
  3. 3. Generating ssh keys• Open gitbash• Launch ssh-keygen.exe• Copy .ssh/id_rsa.pub file to somefolder/my_last_name.pub• Send somefolder/my_last_name.pub to me
  4. 4. Ssh keys generation
  5. 5. Create folder git-workshop• Create folder “git-workshop”• Initialize a new repository git init• Add a new remote repository: git remote add origin gitosis@lifeline.su:git-workshop.gitFetch the project• Run command git fetch• You will fetch all the repository with all branches
  6. 6. Workflow scheme master dev Your Time git merge dev branch r m aste ebase git r
  7. 7. Check status• git statusCreate your own branch• git branch feature_JIRA-TASK-1234_make- cool-website• git checkout feature_JIRA-TASK-1234_make- cool-website• Or just git checkout -b feature_JIRA-TASK- 1234_make-cool-website• Make changes, create files, adjust files• Add new files to the repo: git add <filename>
  8. 8. Committing• You can use git commit –m “My commit message” –a command to make local commitPushing to server• Pushing is as easy: git push origin <branch_name>Switch to dev branch• git checkout devPulling the changes• git pull origin dev
  9. 9. Rebasing from dev• We need to switch back to our own branch: git checkout <your_branch>• Rebase from dev: git rebase devResolving the conflicts• git add <resolved_filename>• git commit –m ”Conflict resolved” -a
  10. 10. Merging into dev• Go back to dev: git checkout dev• Merge your changes into dev: git merge <your_branch> --no-ffPushing to dev server• git push origin devMerging into master• Switch to master: git checkout master• Merge with dev: git merge dev
  11. 11. Push to master branch• git push origin masterStash• git checkout <your branch>• Make changes in files• git stash save “My humble changes”• Check your repo status out: git status• Look up all your stashes: git stash list• Recover your stash: git stash apply <stash_#>
  12. 12. What’s then? WhatPractice!!!

×