🚀 DevOps & SRE Certification Program 📅 Starting: 1st of Every Month 🤝 +91 8409492687 🔍 Contact@DevOpsSchool.com

Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!

We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!

Learn from Guru Rajesh Kumar and double your salary in just one year.


Get Started Now!

Git Lab Exercise & Assignment: Git remote branching and github: Part – 7


These exercises aim to give you some practice with using the Git version control system.
# Find someone to work with.
# Both people:
# Go register for github
# Setup your SSH key (Windows, Linux), also note the Windows git setup
# Should be able to SSH to github: ssh git@github.com
# First person, click the New Repository button on the github.com homepage, push a file to it:
$ mkdir git-workshop
$ cd git-workshop
$ git init
$ touch README
$ git add README
$ git commit -m 'first commit'
$ git remote add origin git@github.com:/git-workshop.git
$ git push origin master
# Second person, go to github.com//git-workshop, fork their repository, and then checkout your copy of it:
$ git clone git@github.com:/git-workshop.git
$ cd git-workshop
$ cat README
# Change README
$ echo "from user2" >> README
$ git commit -a -m "Updated the readme."
# Push user2's change back to user2's clone
$ git push
# First person, pull in user2’s change into your local repo:
# Pull down user2's work
$ git remote add user2 http://github.com/user2/git-workshop.git
$ git fetch user2
# Diff your master to user2's master
$ git diff master..user2/master
# Merge user2's changes
$ git merge user2/master
# Add your own change to README
$ echo "from user1" >> README
$ git commit -a -m "Updated the readme."
# Push the changes to your user1 repo
$ git push
# Second person, pull in user1’s changes, and update your repo:
# Pull down user1's work
$ git remote add user1 http://github.com/user2/git-workshop.git
$ git fetch user1
# Diff against what they added
$ git diff master..user1/master
# Merge user1's changes
$ git merge user1/master
$ cat README
# Push their changes out to your user2 repo
$ git push

Subscribe
Notify of
guest


0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments

Certification Courses

DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:

DevOps Certification, SRE Certification, and DevSecOps Certification by DevOpsSchool

Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.

0
Would love your thoughts, please comment.x
()
x