Manage Git Repositories Kodekloud


Question: A new developer just joined the Nautilus development team and has been assigned a new project for which he needs to create a new repository under his account on Gitea server. Additionally, there is some existing data that need to be added to the repo. Below you can find more details about the task:

Click on the Gitea UI button on the top bar. You should be able to access the Gitea UI. Login to Gitea server using username max and password Max_pass123.

a. Create a new git repository story_blog under max user.

b. SSH into storage server using user max and password Max_pass123 and clone this newly created repository under user max home directory i.e /home/max.

c. Copy all files from location /usr/finance to the repository and commit/push your changes to the master branch. The commit message must be "add stories" (must be done in single commit).

d. Create a new branch max_apps from master.

e. Copy a file story-index-max.txt from location /tmp/stories/ to the repository. This file has a typo, which you can fix by changing the word Mooose to Mouse. Commit and push the changes to the newly created branch. Commit message must be "typo fixed for Mooose" (must be done in single commit).


Go to Gitea UI. Login, Click on New Repository and create the mentioned repository

Then login to storage server

ssh [email protected]

Clone the repository

git clone

Copy necessary files

cp -r /usr/finance/*.* story_blog/

Go to the folder 

cd story_blog

Add, commit , and push to master

git add .
git commit -m "add stories"
git push origin master

Then create another branch that is mentioned in the question

git checkout -b max_apps

Copy necessary files

cp /tmp/stories/story-index-max.txt .

Fix the typo

vi story-index-max.txt 

Finally push to git

git add .

git commit -m "typo fixed for Mooose"

git push origin max_apps




Share on Google Plus

About Ashadullah Shawon

I am Ashadullah Shawon. I am a Software Engineer. I studied Computer Science and Engineering (CSE) at RUET. I Like To Share Knowledge. Learn More: Click Here
    Blogger Comment
    Facebook Comment


Post a Comment