Skip to content

thebrndt/CODE-class

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Github Practice Repository 🚀

[This repository is for students of the CODE University Technical Documentation course to get up to ensure each student knows how to push files to a common repository.]

Contents

  1. Initialize a local directory
  2. Clone the remote repository
  3. Make a new branch
  4. Add a new markdown (.md) file to your local Repo
  5. Merge your branch to main
  6. Commit your changes
  7. Push your changes to the remote repository CODE-class

1. Initialize a local directory

Make a directory and name it CODE-class then cd into it. Afterwards, run the following command:

git init

The local repo is ready now for cloning a remote Repository into it.

2. Clone the remote repository

Clone the CODE-Class repository into the local REPO directory you just created:

git clone https://github.com/glennlea1525/CODE-class.git

4. Make a new branch

git checkout -b <my-branch> (make new branch)

3. Add a new markdown (.md) file to your local Repo

Make a new file and name it as follows:

<your_name.md>

In this file, use Markdown to add your name. You can add anything else you want here, as long as it is in Markdown.

{
  "firstName": "Glenn",
  "lastName": "Lea",
}

Save the file

Note: git branch shows the new branch only after first commit.

4. Track your changes

Shows untracked files (the file you just made)

git status

It should show the new file you just created.

Track the file you just made.

git add .

Ensures the job was done.

git status

5. Commit your changes

Run the commit command and add a short description of this commit.

git commit –m “your_name.md”

6. Push your changes to the remote repository CODE-class

Push changes to a new branch on the remote repository:

git push origin my-branch

You should now see your own branch listed after running:

git branch

Results should show the following:

main
*my-branch

Note: Star next to branch is the currently active branch.

7. Merge your branch into main

(Should this be moved up?)

To merge locally, you must be on the main branch

Switch to the target branch*

git checkout main

Pull the latest changes from the remote to ensure you're up to date

git pull origin main

Merge the source branch into 'main'

git merge my-branch

**Push your changes to main

git push origin main

About

Practice Repo for TechWriting Class

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published