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
  • Current state
  • 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
  • lets add the changes
  • Lets commit the changes
  • Git asks for who you are, configure email and username. Then commit
  • Workflow
  • Now check the status
  • Working tree clean represents your working tree has no changes over and top of what is present in your local repo.
  • Lets check history
  • Lets add one more change


Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a comment

Turn on JavaScript to leave a comment.

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

Please turn AdBlock off
Customized Social Media Icons from Acurax Digital Marketing Agency
Exit mobile version
%%footer%%