AWS 116-[PF]-Lab - Create a git repository

#AWS 116-[PF]-Lab - Create a git repository
Check out my GitHub Repository - github.com/MFMKURIA/AWS-reStr...
Step-by-Step Guide
Accessing the AWS Cloud9 IDE
1. Start your lab environment:
- Go to the top of the instructions and choose `Start Lab`.
- Wait for the message `Lab status: ready`.
- Close the Start Lab panel by choosing the `X`.
2. Open AWS Management Console:
- At the top of the instructions, choose `AWS`.
- The AWS Management Console opens in a new browser tab, and you are logged in automatically.
- If a new tab doesn't open, allow pop-ups for the site.
3. Open AWS Cloud9 Environment:
- In the AWS Management Console, choose `Services \ Cloud9`.
- In the `Your environments` panel, locate `reStart-python-cloud9` and choose `Open IDE`.
Exercise 1: Downloading your Python files from previous labs
1. Download Project:
- From the menu bar in Cloud9 IDE, choose `File \ Download Project`.
- This action downloads a compressed file onto your local machine.
- Extract the contents of this file to a directory on your local machine.
Exercise 2: Creating a GitHub Account
1. Create a GitHub Account:
- Visit [GitHub](www.github.com) and create an account if you don't already have one.
Exercise 3: Reading the GitHub Hello World Guide
1. Read the Hello World Guide:
- Visit [Hello World Guide](guides.github.com/activities/...) on GitHub.
- Follow the steps in the guide to understand how to create a repository and manage it.
Exercise 4: Creating a Private Repository
1. Create a new repository:
- Log in to GitHub.
- Choose the `New` button to create a new repository.
- Fill out the form to create a new repository:
- Repository name: `aws_restart` (or any name you prefer).
- Visibility: Select `Private`.
- Initialize this repository with a README: Check this option.
2. Upload files to the repository:
- After creating the repository, choose the `Upload files` button.
- Upload the files you extracted from the downloaded project in Exercise 1.
Exercise 5: Downloading a Repository
1. Clone or download the repository:
- Go to your repository on GitHub.
- Choose the `Clone or download` button.
- Select `Download Zip`.
2. Save and extract the repository:
- Save the downloaded .zip file to a folder on your local machine, such as `aws_restart`.
- Extract the .zip file to verify that the files were downloaded correctly.
Detailed Explanation of Git Commands and Concepts
Here, we assume you have a basic understanding of navigating the AWS Cloud9 IDE and using the terminal.
Initializing a Local Git Repository
If you were to initialize a local git repository and push to GitHub manually, the steps would be:
1. Navigate to your project directory:
```sh
cd /path/to/your/project
```
2. Initialize a new git repository:
```sh
git init
```
- `git init`: Initializes a new git repository in the current directory.
3. Add files to the staging area:
```sh
git add .
```
- `git add .`: Adds all files in the current directory to the staging area, preparing them for a commit.
4. Commit the files:
```sh
git commit -m "Initial commit"
```
- `git commit -m "Initial commit"`: Commits the staged files with a message describing the commit.
5. Connect to the remote repository:
```sh
git remote add origin github.com/yourusername/yourr...
```
- `git remote add origin URL`: Connects the local repository to a remote repository on GitHub.
6. Push to GitHub:
```sh
git push -u origin master
```
- `git push -u origin master`: Pushes the local commits to the `master` branch of the remote repository. The `-u` flag sets the remote `origin` as the default upstream for the branch.
Each line of code is accompanied by a comment explaining its purpose and function, making it clear for someone who is new to Python.

Пікірлер