Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Chapter #3 #4

Open
jimafisk opened this issue Jan 30, 2019 · 0 comments
Open

Update Chapter #3 #4

jimafisk opened this issue Jan 30, 2019 · 0 comments
Assignees

Comments

@jimafisk
Copy link
Owner

  1. Fork this repository using the button in the upper right.
  2. Clone the forked version of the repository to your local workstation.
  3. Create a feature branch with your name as the branch name (my branch would be called jim).
  4. Change directories so you are in the chapter # that is specified in the title of this issue.
  5. Edit page_1 and your name at the bottom of the file and save it.
  6. Add the missing page_4 inside your chapter folder. The contents of the new page_4 should be your favorite TV show.
  7. Run a git status to see what is modified from a previous version of history and what has not been tracked before.
  8. Add all the changes you made above to the index.
  9. Commit these changes to history and add a short message about what you changed.
  10. Delete page_2. List the files in the directory (ls -lah) to ensure it was removed.
  11. Run git diff to see the actual changes that were made.
  12. Use git to undo the deletion of page_2 (running a git status will give you a hint about how to do this).
  13. Add a FAKE password to page_3 and commit it to your history.
  14. Undo the commit with your password in it and remove the change from your working directory.
  15. Take a look at the .gitignore file in the base directory of the project. Use the contents of the file to figure out a filename you could create to store your password, that git will not track (hint the * character is a wildcard that matches any pattern).
  16. Create a file inside your chapter directory that git will not track and add your fake password there. Run a git status to ensure no modifications have been recognized.
  17. Put a comment in page_3 that says the name of the file you just created where the real password is stored.
  18. Commit the changes to page_3 to history and add a short message.
  19. [Optional] Add a remote called upstream that points to the initial repository ([email protected]:jimafisk/nber-git-training.git). Git pull any upstream changes.
  20. Push all the code changes tracked on your branch to the origin remote repo.
  21. Visit your forked repo in the browser. There should be a notification about recent changes. Click the button in the notification to create a pull request (PR) to the upstream repository (the jimafisk repo you initially forked).
  22. In the PR description, tie the PR to this issue by writing: Fixes #<REPLACE WITH THIS ISSUE NUMBER>.
  23. Assign someone from the group to review your PR.
  24. Reviewers should visit the PR you created in the browser and see a notification that a review has been requested of them. They should begin their review and request that you change the TV show in page_4 to their favorite TV show instead of yours (You will also review someone else's PR, so do the same for them). They can do this with an inline comment and finish the review by "requesting changes".
  25. In your local repository, make the changes your reviewer requested, commit the update to history and push once again to origin.
  26. Reviewers should check the PR again once their partner says they've made the change. Notice how the updates are added automatically to the open PR - this highlights the beauty of feature branches to isolate updates.
  27. Reviewers should approve the PR if page_4 now matches their own favorite TV show.
  28. The developer who created the initial PR should be responsible for merging it into the codebase. Use the "squash and merge" option to consolidate changes related to the feature to a single commit in history.
  29. Delete your feature branch locally and on remote for good housekeeping since the changes are now pulled into the project!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants