DevOps Classroom Series – 29/Apr/2020

Understanding Git

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

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

  • Add changes to the Staging Area and then commit to local repo
  • 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

  • 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
    • Long Version
    • Let me go to the first commit
    • To comeback to latest version execute git checkout master
  • Git Areas Update

  • Is there Any way to revert the changes

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

  • History so far

  • Concept of Head

Leave a ReplyCancel reply

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

Please turn AdBlock off
Social Network Integration by Acurax Social Media Branding Company

Discover more from Direct DevOps from Quality Thought

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

Continue reading

Exit mobile version
%%footer%%