The below steps must be done in order
- Create a directory called hello_git
- Create an index.rb file inside the directory, and puts “Hello world!” in this file
- Change into the hello_git directory and run ‘git status’
- It says it is not a git repository. Initialise this directory as a repo
- Add everything in your directory to your GitHub repo
- Commit these changes - be sure to write a meaningful message
- Push this commit to GitHub
- Create a new branch with whatever name you’d like
- Create a new file called README.md and put an explanation of your project into this file
- Add, commit and push this branch
- Go to Github and merge the pull request
- Back on your local machine, change back to your master branch and pull these new changes down
- When successful, delete the branch you created, so you should only have master left
- Add another file called this_was_a_mistake.rb and add some text into it
- You should never push to master, so take your changes with you and create another branch with a new name
- Add, commit, push these changes
- Back on GitHub, complete a pull request
- On your local machine, change back to master, delete your old branch, and pull down the changes
- Oh drat! We don’t want the file this_was_a_mistake.rb! Rollback to your previous commit!
- Turn to the person next to you, follow them on GitHub and work out how you can clone their repository (and let them clone yours)
- Make some modifications to their repo, and add, commit and push up
- Turn to the person on the other side and fork their repo
- Make some changes, and add, commit and push up