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

Create a Git Repository in GitHub

  • Create a new repository after login into github



Cloning the code into local system

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

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

  • Adding multiple changes
    • Files already in repo will have status of modified or deleted or renamed
    • Files newly created will have status of untracked
  • 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

Get changes from remote into local when repo already exists

  • Use pull
  • Git ways of working in non-tech way
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
Customized Social Media Icons from Acurax Digital Marketing Agency

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%%