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

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner