DevOps Classroomnotes 23/Apr/2022

Git Contd

  • Different States a file can be and actions that transition between them
    Preview
  • Areas of git w.r.t local repository
    Preview
  • Current Status:
    Preview
  • Add all the changes into staging area git add --help
    Refer Here
  • Add only modified files to the staging area
    Preview
    Preview
  • Adding files with some pattern
    Preview
    Preview
  • Other example
    Preview
    Preview

Moving changes from Staged Area back to working tree

  • Add the changes to the staging area
    Preview
  • Now remove one file from staging area (unstage)
    Preview
  • To move the file from modified state in working tree to unmodified
    Preview
  • To move the changes from staging area to unmodified state
    Preview
  • Git reset is the old command and to move the changes from staging area to working tree the following was the approach
    Preview
    Preview
  • Untracked files add to the staging area
    Preview
  • Moving them back to working tree
    Preview
  • To remove the untracked files from worktree we have git clean
    Preview
  • If you have directories as part of your untracked files
    Preview
  • Overview of moving changes
    Preview

Exercises

  • We have executed git reset --hard, try to findout what git reset --soft does?
  • Findout what git revert does ?
  • Findout what git rm does ?

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 Wordpress Development 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