DevOps Classroomnotes 20/Jun/2023

Git Workflow

  • Note: This is a partial workflow and we will be learning complete git in 2 weeks from now
  • Git Remote Repositories are hosted by GitHub/GitLab/Azure Source Repos etc
  • If we don’t have the Code in local system, then we clone the code to create local repo
  • Once we have local repo, to get latest changes we use pull
  • We add the changes to the staging area using add and commit the changes to local repo using commit and sync the changes from local to remote repo using push command
    Preview

Create a Git Repository in GitHub

  • Create a new repository after login into github
    Preview
    Preview
    Preview
    Preview

Cloning the code into local system

  • Identify a folder for local repo C:\temp\gitpractices
  • Now clone using a command git clone <git-url>
    Preview
  • lets look into what are the contents
    Preview

Make changes locally and push to the Remote

  • Add the changes in working tree and then add to staging area.
  • Commit the changes and push to the remote
    Preview
    Preview
  • Adding multiple changes
    • Files already in repo will have status of modified or deleted or renamed
    • Files newly created will have status of untracked
      Preview
  • we can add multiple changes at once to the staging area
  • When we want to move the changes from staging area to local repo, it needs message, author username and email address
    Preview

Get changes from remote into local when repo already exists

  • Use pull
    Preview
  • Git ways of working in non-tech way
    Preview

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