I would like for you to follow these instructions line by line!
All of the commands you will need for this activity are in the course content! When you are done, push your branch to the remote repository and create a pull request!
Here are the instructions!
- Go to the [Github website] (https://github.com/OCclassprojects/gitactivity)
- Fork the repository to your Github account
- Clone the repository with Git on your computer
- Use git log to look at the file structure and commits. Note how many commits, trees, and blobs there are!
- Create a new branch and checkout (you can name the branch what you want)
- Use git log to look at your new branch
- Create a new file called test.txt
- Write “Github is awesome!” in your file and save it.
- Add and commit your new file to your branch
- Now run a git fetch to see if any new files are on the main repo
- Use git merge to merge your branch to the master branch on your local repo
- Get on the master branch as your working directory
- Use git interactive rebase to change move the 2nd commit to a spot after the 4th commit
- Change the commit message to “moved commit”
- Use git interactive rebase to squash the 2nd, 3rd and 4th commit into one.
- Change the commit message to “squashed 2,3,4”
- Use git reflog to look at your work
- Bonus: type in gitk --all and screenshot the GUI graph of your repository and commit it to your branch
- Bonus: use the command git log --graph --full-history --all and screenshot that and commit it to your branch
- Push your branch to the remote repository and create a Pull Request!
Make sure and keep a copy of your work for your mentors!