DevOps Classroom Series – 29/Apr/2020

Understanding Git

  • Lets try adding an empty folder as a change
mkdir test
git status

Preview

  • Git will identify only files not folders. so lets add some file to test directory
echo "hello" >> test/test.py

Preview

  • Add changes to the Staging Area and then commit to local repo Preview
  • Add all changes from Working tree to staging
git add --all
  • Add only modified changes from working tree to staging area
git add -u
  • Recomendation: git add --help

  • Multiple adds from working area to staging area and commit them Preview Preview Preview Preview Preview

  • Lets Travel Back to older changes (Versions)

    • Whenever you commit the changes to local repo, a commit-id gets created. commit Id has two versions long and short
    • Short Version Preview
    • Long Version Preview
    • Let me go to the first commit Preview
    • To comeback to latest version execute git checkout master Preview
  • Git Areas Update Preview

  • Is there Any way to revert the changes

    • From Working Tree: Preview
    • From Staging Area To Working Tree Preview Preview
    • From staging area: Preview Preview
    • Exercise: There is also a command git reset --soft findout what it does
  • How to deal with deleting the files Preview

  • History so far Preview

  • Concept of Head Preview

Leave a Reply

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

Please turn AdBlock off
Floating Social Media Icons by Acurax Wordpress Designers

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