Skip to content

Instantly share code, notes, and snippets.

@amartinezg
Created February 15, 2018 02:14
Show Gist options
  • Select an option

  • Save amartinezg/822b4b603e23401e0d4b0d93eee05dd9 to your computer and use it in GitHub Desktop.

Select an option

Save amartinezg/822b4b603e23401e0d4b0d93eee05dd9 to your computer and use it in GitHub Desktop.
Github practice Step by step
2 - 3 people
1. Choose main person / project
2. Clone the project of the main person
3. The main person should add the others as collaborators:
- https://stackoverflow.com/questions/7920320/adding-a-collaborator-to-my-free-github-account
4. Person 1:
- Create a new file
- Add content
- Create a commit
- Push changes to master
Person 2:
- git pull origin master
- Create a new file
- Add content
- Create a commit
- Push changes to master
5. git pull origin master
6. git log
7. Person 1:
- Edit one file
- Create a commit
- Push changes
Person 2:
- Edit SAME file
- git stash
- git pull origin master
- git stash apply
- Create a commit
- Push changes
8. git log
9. Person 1:
- Create a new branch named "ticket_1", make some changes and commit them (git checkout -b ticket_1)
- Push ticket_1 branch to github (git push origin ticket_1)
- Create a new pull request against master (see github)
- Person 2 should approves of the PR
- git pull origin master
10. Person 2:
- Create a new branch named "ticket_2", make some changes and commit them (git checkout -b ticket_2)
- Push ticket_2 branch to github (git push origin ticket_2)
- Create a new pull request against master (see github)
- Person 1 should approves of the PR
- git pull origin master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment