Code Monkey home page Code Monkey logo

git-demo-repo's Introduction

Git Demo

Demo to allow students to get familiar with git commands.

The slides are located at: https://docs.google.com/presentation/d/1naeKnJGKVR22UrcNk3jpslysDaSZanp9HinpzaxFkZY/edit?usp=sharing

Steps


Step 1

Fork the repository at

https://github.com/valfragier16/git-demo-repo

To fork the repo click Fork in the Right corner of your repositiory.
Github fork button
Creat Fork GIF

Step 1.5

*** if working with a team add collaborators via Repository Settings -> Manage Access -> Invite Collaborators. Once they have accepted the invitiation they can edit and commit changes to your repo.

Add Collaborators GIF


Step 2

Navagate to whatever directory you plan on using for your root development directory. If you're using a separate directory for microlabs go there. Essentially, just go to where you would normally want to keep all of your work. From there, clone your fork.

git clone https://github.com/your_username/git-demo-repo.git

You should now have git-demo-repo in your directory.


Step 3

Create a new branch in that project and check that out. Run the following command:

git checkout -b <Your_Branch_Name>

The comments in the terminal should inform you that the branch has been switched to your branch


Step 4

Since the class is working on this repository run a git pullto ensure you have the most updated code changes.

git pull origin main

Step 5

Edit the sharingCircle.txt file by adding something you learned or proud of in relation to the program, followed by your name at the end. Follow the syntax of what is already in the file.


Step 6

Check the status. Notice that the sharingCircle.txt file has been modified. Make sure you save your changes, and commit it with the message "Your_Name edited the File". Run the following:

Stage your changes

git add .

Commit your changes with a message

git commit -m "<Your Name> edited the File"

Push your code to your remote branch in Github

git push

Step 7

Now go to your github repository for this project , or follow the link that is presented in the comments of your terminal after the git push command.


Step 8

Create a pull request to merge your code changes into main branch.
Create Pull Request GIF


Successful merge into main would look something like this:

Successful GitHub Merge


Step 9

Once your branch has been merged into main, view the branches and see the code changes.
Review code changes/branches


Step 10

If you run into issues checkout Resolving Merge Conflicts

git-demo-repo's People

Contributors

alogan15 avatar crackncode avatar elpanther avatar kcee917 avatar nkanusi avatar valfragier16 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.