DevOps Classroomnotes 16/Feb/2023

Git

  • We will be using Git for local repository.
  • For today and next session, assume we have one user and one system.
  • Installing Git on Windows: Follow classroom recording

Create a folder and make this a local repo using git

  • Create a folder anywhere on your system
mdkir c:\gitpractice
cd c:\gitpractice
mkdir hellogit
cd hellogit
  • on *nix systems
mkdir -p /tmp/gitpractice/hellogit
cd /tmp/gitpractice/hellogit
  • To create a local repo using a initalize command init in git
    Preview
  • Current state
    Preview
  • For the changes to be versioned we need to have the changes in local repo.
    • We work on working tree
    • move the changes to staging area
    • move the changes from staging area to local repo
    • once the changes are in local repo we have some version, who has done the change, when the change was done, changes
  • Lets create a main.py in src folder and ask for status
    Preview
  • lets add the changes
    Preview
  • Lets commit the changes
    Preview
  • Git asks for who you are, configure email and username. Then commit
    Preview
  • Workflow
    Preview
  • Now check the status
    Preview
  • Working tree clean represents your working tree has no changes over and top of what is present in your local repo.
  • Lets check history
    Preview
  • Lets add one more change
    Preview
    Preview
    Preview

Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Animated Social Media Icons by Acurax Responsive Web Designing Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Visit Us On FacebookVisit Us On LinkedinVisit Us On Youtube