GitTest
This repo is meant to help you get some basic hands on experience with the most basic git commands.
It consists of a Spice Girls lyrics txt file - wannabe.txt - that needs some fixing,
And a simple python script that contains a few very simple bugs.
To work with this git repo, follow the following steps:
- Fork the https://github.com/daximillian/GitTest.git to your Github user. There's a fork button on the top left of the Github site. Now you have a copy of my repo to work on privately, without affecting my repo. I'll refer to your copy with the $USER variable here. Replace that with your Github user name.
- Create two separate folders on your local machine. Call one folder Sheldon, and one folder Penny.
- cd into the Sheldon folder
- git clone https://github.com/$USER/GitTest.git
- cd into the Penny folder
- git clone https://github.com/$USER/GitTest.git
- cd out of the Penny folder
- You are now going to simulate two programmers working on the same codebase at the same time: Penny and Sheldon.
- cd into the Sheldon folder and fix all the BOTH and SHELDON lines in the wannabe.txt file.
- cd into the Penny folder and fix all the BOTH and PENNY lines in the wannabe.txt file.
- Your changes in both folders are local. You are now going to add them to the server copy, the repo you forked and cloned from Github in this case.
- You're going to stage all your changes, and comment on them with the following commands:
- git add .
- git comment -m "add Penny's fixes to the wannabe.txt file"
- Now you're going to push the staged Penny changes to your forked folder:
- git push origin main
- Did it work?
- cd into the Sheldon folder.
- You're going to stage the Sheldon changes now:
- git add .
- git comment -m "add Sheldon's fixes to the wannabe.txt file"
- Now you're going to push the staged Sheldon changes to your forked folder:
- git push origin main
- Did it work?