DevOps – Classroom notes – 31/03/24

Restoring in Git

  • Git reflog: this is a permanent log of changes done in the local repository. using ref log we can reset the work done
  • Using reflog we can revert deleted commits
  • We have done
    • reverting a rebase
    • restore a deleted commit
  • we have used git switch to create a branch from a commit

Tag

  • Tag always points to a fixed commit
  • Generally organizations create tag, when they give a release.
  • There are two types of tags
    • lightweight: they have just tag name
    • annotated tags: here we can add additional information
  • Refer Here

Fourth Area of Git = Remote Repo

  • Remote Repository represents a git repo(s) where all of your will get or submit code changes for the team.
  • Remote Repository is same as git repository, but it will have two extra features provided by daemon
    • an endpoint to communicate
      • https
      • ssh or git
    • user management
  • To run remote repos, we have two options
    • self hosted git
      • Git lab
      • Gitolite
    • Cloud hosted git
      • Git lab
      • Git Hub (Most popular cloud hosted git repository)
      • Azure Source Repos
      • AWS Code Commit
      • BitBucket
  • The process of getting a git repository from remote to local is called as clone
  • Lets setup ssh-key in GitHub
# Execute if you dont have keys
ssh-keygen
# add the ssh key to github
# navigate to folder
git clone <url>
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
Floating Social Media Icons by Acurax Wordpress Designers

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