DevOps Classroom notes 14/Nov/2023

Git Contd

  • Git identifies changes w.r.t files not folders. Empty folder is not a change in git.
  • We can configure git to ignore some files or folders. To do this we need to create a file called as .gitignore in the root folder of the repository. To create ignore based on tools and languages Refer Here
  • Exercise:
    • Create git ingore files for the following combinations
      • Java:
        • IDE: Eclipse
        • Build: Maven
      • Dotnetcore:
        • IDE: Visual Studio
      • ReactJs:
        • IDE: visual studio code
      • Terraform:
        • IDE: visual studio code
      • Ansible:
        • IDE: visual studio code

Moving Changes from staging area to working tree and remove the changes from working tree

  • Ensure only main.py is committed


  • History
  • Remove the app.py changes from working tree
  • Revisit Git Areas
  • To remove all the untracked files from a specific folder
git clean -fd <path>


* We have executed git reset --hard
* We have two other flavors of git reset
* soft
* mixed
* I will be discussing on when to use what in next 3 days
* When we execute git status and git log along with status we see one extra term master

* By default master always looks at latest commit and HEAD represents what your working tree is looking at



* Lets move our head to 2 commit

git checkout <commit-id>



* To go back to latest commit

git checkout master


Published
Categorized as Uncategorized Tagged

By continuous learner

devops & cloud enthusiastic learner

Leave a ReplyCancel reply

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

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design 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%%