0% found this document useful (0 votes)
45 views24 pages

Sqa 2

Git is a distributed version control system that tracks changes to files, usually used for coordinating work among software developers collaboratively developing source code. GitHub is a web-based hosting service for Git repositories that provides additional features like access control and bug tracking. The document provides step-by-step instructions for two group members to set up Git repositories locally and on GitHub, including creating and pushing commits with files and collaborating on a shared repository.

Uploaded by

Khadija Afzal
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)
45 views24 pages

Sqa 2

Git is a distributed version control system that tracks changes to files, usually used for coordinating work among software developers collaboratively developing source code. GitHub is a web-based hosting service for Git repositories that provides additional features like access control and bug tracking. The document provides step-by-step instructions for two group members to set up Git repositories locally and on GitHub, including creating and pushing commits with files and collaborating on a shared repository.

Uploaded by

Khadija Afzal
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/ 24

ASSIGNMENT NO.

2
FALL-22-IT-436-SOFTWARE QUALITY ASSURANCE
TO: MR. SHAREEF HUSSAIN
BY: KHADIJA AFZAL & UBAID-UR-REHMAN
REGISTRATION NO.: 04161913046 & 04161913051
BS 7TH INSTITUTE OF INFORMATION
TECHNOLOGY
DUE: 11-NOV-2022.
Q .1. What is Git and GitHub describe in detail? Create a
GitHub account and make the repository, mention each
group member's GitHub repository URL.

Git:
Git is free and open source software for distributed version
control: tracking changes in any set of files, usually used
for coordinating work among programmers
collaboratively developing source code during software
development. Its goals include speed, data integrity, and
support for distributed, non-linear workflows.
GitHub:
GitHub is an Internet hosting service for software
development and version control using Git. It provides the
distributed version control of Git plus access control, bug
tracking, software feature requests, task management,
continuous integration, and wikis for every project.
Headquartered in California, it has been a subsidiary of
Microsoft since 2018. It is commonly used to host open-
source software development projects.
MEMBER 1-UBAID-UR-REHMAN:

Repository URL:

https://github.com/iubaidrmn/sqa-assignment
MEMBER 2- KHADIJA AFZAL:
STEP 1: I have already created my git hub account, so I am
directly signing in using my username and password.

STEP 2: After clicking on create a new repository, write a


unique name for it. Add a description if you want and
make it private or public. Click on create at the end.
STEP 3: Copied my HTTPS URL.
URL: https://github.com/Khadijaafz/KhadijaRepo.git

Q2. What is conflict in source code management and how


to resolve it?
Conflict:
Conflicts occur when two or more people change the same
lines of the same file.
Source Code Management:
Source code management (SCM) is used to track
modifications to a source code repository. SCM tracks a
running history of changes to a code base and helps
resolve conflicts when merging updates from multiple
contributors. SCM is also synonymous with Version
control. system does not allow people to overwrite each
other’s changes blindly, but highlights conflicts so that
they can be resolved.
Q .3. Explain the following git commands.

1. git config --global user.name "UserName"

Setting Username to be used with commits.

2. git config –global user.email [email protected]

Setting email to be used with commits.

3. git config --global –list

It will show all Git config properties throughout all the


variously scoped Git files.
4. git status

The git status command displays the state of the working


directory and the staging area.
5. git branch

The git branch command lets you create, list, rename, and


delete branches. It doesn't let you switch between
branches.
6. git checkout

The git checkout command lets you navigate between the


branches created by git branch . Checking out a branch
updates the files in the working directory to match the
version stored in that branch, and it tells Git to record all
new commits on that branch.
7. git switch master

To switch to the master branch, on this specific commit,


we are going to execute the “git checkout” command and
specify the “master” branch as well as the commit.
8. git add . / git add-A

The git add command adds a change in the working


directory to the staging area.
9. git add

Adding specific named file.

10. git commit -m "Type your message here..."

The -m stands for message. When calling git commit, it is


required to include a message.
11. git push -u origin master
Whenever we need to push the changes to a remote
repository, we use git push along with the remote
repository “origin” and “master” branches. The term
used is “git push origin master“.
12. git push --set-upstream origin master

The git set-upstream allows you to set the default remote


branch for your current local branch.
13. git push --all

Push all your local branches to the specified remote


branch.
14. git log (After Git Log press shift+q)

The git log command shows a list of all the commits made


to a repository. You can see the hash of each Git commit,
the message associated with each commit, and more
metadata. This command is useful for displaying the
history of a repository.
15. git show
This would show you the commit history, listing the
commits in chronological order, with the latest commit
first.
16. git stash

The git stash command takes your uncommitted changes


(both staged and unstaged), saves them away for later
use, and then reverts them from your working copy.
17. git stash list

The Git stash list command will pull up a list of your


repository's stashes.
18. git stash apply@{0}
git stash temporarily shelves (or stashes) changes you've
made to your working copy so you can work on
something else, and then come back and re-apply them
later.
19. git stash clear

Delete the most recent stash. To get rid of the most recent stash
in your list: git stash drop.
20. git reset

You can remove the file from the index while keeping your
changes with git reset. This removes the file from the index while
keeping it in the working directory. This commits all other
changes in the index.
21. git reset .

git reset is a powerful command that is used to undo local

changes to the state of a Git repo.

22. git reset –hard


To hard reset files to HEAD on Git, use the “git reset”
command with the “–hard” option and specify the HEAD.
The purpose of the “git reset” command is to move the
current HEAD to the commit specified.
23. git revert
The git revert command is a forward-moving undo
operation that offers a safe method of undoing
changes.
24. git revert <commit-ID>

It will "remove" newer commits from the branch. This


means, after looking at your old code, you cannot go to
the newest commit in this branch again, easily.
25. git fetch

git fetch is a primary command used to download contents


from a remote repository.

26. git pull origin master


fetches commit from the master branch of the origin
remote (into the local origin/master branch), and then it
merges origin/master into the branch you currently have
checked out.
Q .4. Each member of group applies step by step
all basics Git Commands of “Git-Commands.txt”
file.
STEP 1: Following 4 basic git commands are used
here:
 VERSION
 CONFIG
 MKDIR (make directory)
 CD (change directory)
STEP 2: Initialize an empty repository by using INIT
command.

STEP 3: Create a file in this repository using TOUCH


command, opening it using NOTEPAD file name
with the editor’s extension i.e., HTML and coding in
it.
STEP 4: Use STATUS command to check committed
files. No files committed (shown in red).

STEP 5: Add file by ADD. command and rechecking


the status.
STEP 6: Using GIT COMMIT command to add a
message to the repository. Rechecking the status.
Shows everything clean! Next. Using GIT LOG to
see the repository details (commit ID, author
username, email, day, date, time of creation and
message).
STEP 7: Creating a repository on git hub with the
same name as in my local pc.
STEP 8: Copying the REMOTE and PUSH command
to see a git hub box pop up on the screen. Then,
typing the credentials to sign in!
STEP 9: Repository is successfully pushed from the
local pc on to the git hub server!
MEMBER 2-UBAID-UR-REHMAN

Applying following commands Git version

Where git Username Email


Git config --list
Applying following

commands

Applying following commands Git init


Git status( no commits yet)

Touch Kfile.html(to create new html file)


Notepad Kfile.html to open in html

Applying following commands Git add .


Applying following commands

Git status

Git commit -m “my first git


repository” adding comment

Git log (for checking credentials)

Applying following commands

Git remote add(adding repository to


git hub)

Git remote -v

Git push -u
Creating repository with same name

Opening pushed file in github

Repository with same name on github


Me and my group member are collaborators on her
repository. Now, I’m pulling the contents of Khadija’s
repository in my desktop.

You might also like