DevOps Classroomnotes 15/Jul/2023

Fourth area of Git – Remote Repo

  • Remote-Repo: This represents git repository some where else
  • Any software which hosts git-repo is called as git servers or git hosted repositories
  • Git Remote Repositories can be hosted by many platforms/servers
    • Self-Hosted:
      • Gitolite
      • Git-lab
    • Cloud-Hosted or Git as Service
      • GitHub
      • BitBucket
      • Azure Source Repos
      • AWS Code Commit
  • Git repository will have connection to remote-repo and a name to it. Default remote conections name is origin
  • Cases
    • if you have local repo and then if you have created remote repo
      • remote add to add connection
      • push to send your git objects
      • pull to get git objects
    • you have remote repo already and you need local repo in your system.
      • clone
  • When a remote repo is connected git branch -r will show remote branches
  • Git pull has two variants
    • pull: this might lead to extra merge commits
    • pull with rebase: this will not lead to extra merge commits
  • Pull operation is fetch + merge
  • pull or push command require name of remote and branch names
git pull origin main
git push origin main
  • if you want to set default remote and branch then we can set upstream branch
# while first creation of branch and pushing

git push  -u origin main


  • Create a new repository in
    • Github: Refer Here
    • Azure Source Repos
    • AWS Code Commit


  • Git reference objects refspec
    • Branches
    • Tags
  • Tag points to specific commit and it doesn’t move like branch
  • We have two types of tags
    • lightweight tags
    • annonated tags


  • Create a new repo
  • make 3 commits
  • delete 2nd commit
  • now recover the deleted commit

Install – Jenkins

sudo apt update 
sudo apt install openjdk-17-jdk -y
curl -fsSL | sudo tee \
  /usr/share/keyrings/jenkins-keyring.asc > /dev/null
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt update
sudo apt install jenkins -y

  • Navigate to http://<public-ip>:8080
  • findout the initial Admin password
sudo cat /var/lib/jenkins/secrets/initialAdminPassword

* Now install suggested plugins
* Create a new admin user

Leave a Reply

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

About continuous learner

devops & cloud enthusiastic learner