0% found this document useful (0 votes)
31 views12 pages

Software Constraction Design Lab No 05

The document outlines the objectives and tasks for a software configuration management lab, including creating and merging branches, adding files and directories, and amending commits using GitHub. It provides instructions for completing the lab work individually and explains that students will be creating branches, merging, adding files, and changing commit messages and files in GitHub. The document also includes descriptions of various Git commands for version control tasks like branching, merging, committing, reverting, and viewing logs.

Uploaded by

Mubashir Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views12 pages

Software Constraction Design Lab No 05

The document outlines the objectives and tasks for a software configuration management lab, including creating and merging branches, adding files and directories, and amending commits using GitHub. It provides instructions for completing the lab work individually and explains that students will be creating branches, merging, adding files, and changing commit messages and files in GitHub. The document also includes descriptions of various Git commands for version control tasks like branching, merging, committing, reverting, and viewing logs.

Uploaded by

Mubashir Hussain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 12

LAB NO.

05
Configuration management Software and processes
Following are the lab objectives:
1. Create branches, merge branches, add file and directory using

different commands in the GitHub tool.


Lab
2. Create a branch using credentials in GitHub.

Objectives

Roll Student
No. 4979 Name Mubashir Hussain

Comments
Marks
Task
20
1
Task
20
2
Total
Mark 40
s

Mam Ayesha Amjid


Lab Instructor
Lab Objectives and CLOs Mapping

Lab CLOs
Objectives 1 2 3 4
1
2

Instructions
▪ This is individual Lab work/task.

▪ Complete this lab work within lab timing.

▪ Discussion with peers is not allowed.

▪ You can consult any book, notes & Internet.

▪ Copy paste from the Internet will give you negative marks.

▪ Lab work is divided into small tasks, completing all tasks sequentially.

▪ Show the solution of each lab task to your Lab Instructor.

▪ In-Lab Exercises/Tasks

▪ Write your code at provided space after each question

▪ You need to upload code for all tasks at LMS.


Software Configuration Management:

The process of Software Configuration Management contains operations such as controlling,


managing, and organizing the source-code, documents, and other essential components
during the Software Development Life Cycle.SCM is essential for all project management
activities. The goal of the SCM is to increase productivity with fewer mistakes.
Merge branches Using GitHub:
First, checkout the branch you want to merge in, then run:
git merge branch-from
Merges the commits from "branch-from" into the currently checked out branch.
Finalize the merge commit after resolving conflicts
git commit
Concludes a merge after fixing conflicts.
Delete branch
git branch -d branch-to-delete
Deletes the branch called "my-branch-to-delete".
Create a branch and checkout (switch) to it
git checkout -b my-new-branch
Creates and checks out (switch) to a new branch named "my-new-branch".
Change the message and/or files of the last commit
Using the information in your staging area to amend the last commit
git commit --amend
If no change is made to the staging area since your last commit, only the message will be
updated.
Revert a commit
git revert abc123
Reverts changes introduced by that commit "abc123" by creating another commit that is the
"opposite" of "abc123".
Provide a message with your commit
git commit -m "Commit Message"
Mark the file as resolved after a merge conflict
git add myFile.txt
Marks the "myFile.txt" as resolved after a merge conflict.
Show the log, one line for each commit
git log --oneline
Abort a merge
git merge --abort
Cancels the merge process and tries to go back to the state before the merge.
Show the latest N commits
git log -3
Show the log containing commit history
# Show all commits

git log

# Show the most recent 5 commits

git log -5

# Show commits on one line

git log --oneline

# Show a patch with changes introduced by each commit

# Limiting the result to the most recent two commits

git log -p -2
Add file or directory to staging
# Add single file

git add file.txt

# Add multiple files

git add file1.txt file2.txt


# Add all text files in current dir

git add *.txt

# Add files in "my-dir"

git add my-dir

List the available branches with details about the upstream branch and last commit message
git branch -vv
Using "-v" instead of "-vv" shows less information.
Create a new branch
git branch my-new-branch
Creates a branch named "my-new-branch".
Switch to a different (existing) branch using "git checkout"
git checkout develop
Checks out (switch) to an existing branch named "develop".
Lab Task 01:

Create branches, merge branches, add file and directory using above commands in
GitHub tool. (20)
Lab Task 02:
Create a branch and checkout (switch) to it then change the message and/or files of the last
commit,show the log containing commit history using above credentials in GitHub.
(20)
The End

You might also like